CSS3是前端开发者必须掌握的技能之一,它引入了很多新特性来优化样式设计。下面我们来看一下CSS3中的一些新特性:
1. 边框圆角(border-radius) <div style="border-radius: 10px;"> 2. 阴影(box-shadow) <div style="box-shadow: 10px 10px 20px grey;"> 3. 渐变(gradient) <div style="background: linear-gradient(to bottom,#00f,#f00);"> 4. 旋转(transform) <div style="transform: rotate(30deg);"> 5. 过渡(transition) div:hover { background-color: grey; transition: background-color 1s ease; } 6. 动画(animation) div { animation-name: example; animation-duration: 4s; } @keyframes example { from {background-color: red;} to {background-color: yellow;} }
以上就是CSS3的一些新特性,掌握这些技能可以使我们的设计更加丰富多彩。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。