HTML5+CSS3半透明动画效果

qq_31842135 qq_31842135 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
请大家帮忙看下下面这段代码显示不出效果<!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>CSS半透明效果</title>
<style type="text/css">
body{background:#CCC;}
.main{width:980px;
margin:0px auto;
border-radius:12px;
box-shadow:4px 4px 3px #30F,
-4px -4px 5px #F03;
padding:20px;
}
.box{width:200px;
height:300px;
background:#0F0;
border-radius:10px;
border:5px solid #309;
position:relative;overflow:hidden;}
.box .scale{position:absolute;
top:0px;
left:0px;
width:200px;
height:300px;
color:#FFF;
}
.box .scale h3{width:180px;
font-size:18px;
margin:10px;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
left:-200px;
position:absolute;
font-size:18px;}
.box .scale p{width:180px;
font-size:12px;
margin:10px;
text-indent:2en;
line-height:20px;
left:-200px;
position:absolute;
top:40px;}
.box .scale i{
position:absolute;
bottom:0px;
}
box:hover img{-moz-transform:Scale(1.5);
-moz-tansition:all 900ms ease;}
.box:hover .scale{background:rgba(0,0,0,0.5);
}
.box .scale h3{-moz-transform:translateX(200px);-moz-tansition:all 400ms ease-out;}
.box .scale p{-moz-transform:translateX(200px);-moz-tansition:all 900ms ease-out;}
</style>
</head>

<body>

</body>
<div class="main">
<div class="box">
<img src="tp/1.jpg" width="200" height="300" alt="美丽的传说你的白马王子"/>
<div class="scale">
<h3>2015夏季新装时尚上市 秋装也即将登台 敬请期待哦也</h3>
<p>2015夏季新装时尚上市 秋装也即将登台 敬请期待哦也</p>
<i>2015-10-10</i>
</div>
</div>
</div>
</html>
...全文
评论 4
收藏 已收藏
分享
返回顶部
qq_31842135
CSS 61,116 成员 60,701 内容