将图片的说明文字显示在图片之上且背景半透明效果

原内容来自“标准之路”网站

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>文字置于图片之上且背景半透明 标准之路www.aa25.cn</title>

<style>

a.title { color:#D3D3D4; background-color:rgba(0,0,0,0.6); filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#A0000000', EndColorStr='#A0000000');padding: 12px 24px; position: absolute; top: 228px; left:0; width: auto; text-decoration: none; font: 82px Microsoft YaHei, Verdana; color:#fff;

</style>

</head>




<body>

<div style=" position:relative; width:1280px;"><img src="/upload/2012-04/27/081923_6a63f6246b600c33fcca25821a4c510fd8f9a1cd.jpg" width="1280" height="960" /><a class="title" href="#">探秘古代帝王生活</a></div>

</body>

</html>

posted @ 2014-03-19 12:58  nc_blog  阅读(337)  评论(0编辑  收藏  举报