【发布时间】:2016-09-08 20:30:14
【问题描述】:
所以我最近一直在做一个项目,我应用到 div 的转换不起作用。不知道为什么!
这是CSS代码
.stats .box {
background-color: rgba(255, 255, 255,0.07);
color: white;
padding: 40px 0;
text-align: center;
transition: 0.7s all ease-out;
margin: 20px 0;
}
.stats h2 {
margin: 25px 0 10px 0;
font-size: 35px;
font-family: "Montserrat";
color: rgb(255, 255, 255);
text-transform: uppercase;
letter-spacing: 2px;
font-weight: 200;
}
.stats h4 {
font-weight: 100;
font-size: 15px;
}
.stats .box:hover {
background-image: -moz-linear-gradient(102deg, #1ad2fd 11%, #008aff 100%);
background-image: -webkit-linear-gradient(102deg, #1ad2fd 11%, #008aff 100%);
background-image: -ms-linear-gradient(102deg, #1ad2fd 11%, #008aff 100%);
transition: 0.7s all ease-out;
}
这是 HTML 代码
<div class="col-sm-6">
<div class="box">
<h2>4326</h2>
<h4>Lines of Code</h4>
</div>
如果您想现场观看,这里也是 CodePen http://codepen.io/PlatoCode/pen/qadvZV
谢谢
【问题讨论】:
标签: html css css-transitions transitions