css3实现颜色渐变
<header></header>
css样式:
* {
margin: 0;
padding: 0;
}
header {
width: 100%;
height: 50px;
background-color: #1c2327;
position: relative;
}
header::before {
content: '';
width: 100%;
height: 5px;
background-image: linear-gradient(to left, green, blue, skyblue, red, pink);
position: absolute;
left: 0;
right: 0;
}
代码演示:
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果