HTML代码中,我们常常使用
标签来生成水平分隔线,下面分享几款不同样式的水平分隔线
相关CSS代码
/* 渐变 color1 - color2 - color1 */
hr.style-one {
border: 0;
height: 1px;
background: #333;
background-image: linear-gradient(to right, #ccc, #333, #ccc);
}
/* 透明渐变 - color - transparent */
hr.style-two {
border: 0;
height: 1px;
background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}
/* 双线 */
hr.style-three {
border: 0;
border-bottom: 1px dashed #ccc;
background: #999;
}
/* 单线阴影 */
hr.style-four {
height: 12px;
border: 0;
box-shadow: inset 0 12px 12px -12px rgba(0, 0, 0, 0.5);
}
/* 云朵状 */
hr.style-five {
border: 0;
height: 0; /*