首页 > Web开发 > 详细

css实现文字层浮在图片之上示例代码

时间:2016-01-01 00:11:49      阅读:301      评论:0      收藏:0      [点我收藏+]
技术分享 
代码如下:

复制代码
代码如下:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>说明</title>
<meta name="keywords" content="关键词" />
<meta name="description" content="摘要" />
<link href="css/global.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<script src="scripts/js/html5.js"></script>
<![endif]-->
<style type="text/css">
*{
padding:0;
margin:0;
}
.images-content{
position: absolute;
z-index: 1;
left: 0;
bottom:0;
width: 100%;
color: #fff;
background: rgba(0,0,0,.7);
height: 54px;
line-height: 54px;
overflow: hidden;
}
.images-wrapper{
width:251px;
height:330px;
position:relative;
}
</style>
</head>
<body>
<div class="images-wrapper">
<img src="images/goods-1.jpg" alt="商品111" title="商品1"/>
<div class="images-content">
1111111111
</div>
</div>
</body>
</html>

css实现文字层浮在图片之上示例代码

原文:http://www.jb51.net/css/93437.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!