css3语法中引用了很多新的特性,下面编程教程网小编给大家简单介绍一下!
伪元素选择器
p::before{
content: "→ ";
}
属性选择器
[title]{
color: #f00;
}
线性渐变
.gradient {
background: linear-gradient(to bottom, #ffffff, #000000);
}
径向渐变
.gradient {
background: radial-gradient(circle at center, #ffffff, #000000);
}
过渡属性
.btn {
color: black;
transition: color 0.5s ease-out;
}
.btn:hover {
color: white;
}
动画效果
.circle {
width: 100px;
height: 100px;
border-radius: 50%;
background-color: blue;
animation: circle-color 5s alternate infinite;
}
@keyframes circle-color {
0% { background-color: blue; }
50% { background-color: yellow; }
100% { background-color: red; }
}
平移变形
.box {
transform: translate(20px, 20px);
}
缩变形
.box {
transform: scale(2);
}
旋转变形
.box {
transform: rotate(45deg);
}
以上是编程学习网小编为您介绍的“css3有哪些新特性(简单介绍)”的全面内容,想了解更多关于 前端知识 内容,请继续关注编程基础学习网。
沃梦达教程
本文标题为:css3有哪些新特性(简单介绍)


基础教程推荐
猜你喜欢
- Web设计师如何制作Retina显屏设备的图片 2024-01-09
- 网页布局入门教程 如何用CSS进行网页布局 2023-12-23
- Three.Js实现看房自由小项目 2024-01-07
- firefox推荐与个人理解的css书写顺序 2023-12-22
- Vuex实现计数器以及列表展示效果 2024-03-31
- TWebBrowser 与 MSHTML(2): 获取 window 对象的时机 2023-10-27
- GSAP动画库使用示例 2025-01-24
- 20个JavaScript开发小技巧 2024-12-08
- Ajax返回值类型与用法实例分析 2023-02-23
- DNF暗精灵遗迹入口在哪 暗精灵遗迹进入条件介绍 2024-03-09