在网页设计中,分割线的作用很大,可以分割不同的模块,使网页更加美观。那么,在CSS中如何写分割线呢?首先,我们可以使用border属性来实现分割线的效果。下面是一个例子:p { border-bott
p { border-bottom: 1px solid black; }
p { position: relative; } p:after { content: '; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background-color: black; }
p { background: linear-gradient(to right, black, white 50%, black); background-position: 0 100%; background-size: 100% 1px; background-repeat: no-repeat; }
粉丝
0
关注
0
收藏
0