今天看layui文档时看到首页一个按钮有一个缓慢变化的效果。
于是自己尝试了一下:
<style>
.div {
width: 200px;
height: 100px;
border: 1px solid #dddddd;
transition: all 0.5s linear 0s;
text-align: center;
line-height: 93px;
font-size: 16px;
font-family: youyuan;
cursor: pointer;
}
.div:hover {
border-radius: 50px;
font-weight: bold;
border: 1px solid #ffffff;
}
.div1:active{
color: #dddddf;
border: 1px solid #dfdfdf;
}
</style>
<body>
<div class="div">
Layui 经典模块化前端框架
</div>
</body>