偽元素設(shè)置了分割線為什么不起作用
.nav?li:before{ ???border:linear-gradient(to?bottom,#ccc,#cc1,#ccc)?left/1px?15px?no-repeat; }????????/*刪除第一項(xiàng)和最后一項(xiàng)導(dǎo)航分隔線*/ .nav?li:first-child{ ???display:none; } .nav?li:last-child{ ???display:none; }
如代碼所示
.nav?li:before{ ???border:linear-gradient(to?bottom,#ccc,#cc1,#ccc)?left/1px?15px?no-repeat; }????????/*刪除第一項(xiàng)和最后一項(xiàng)導(dǎo)航分隔線*/ .nav?li:first-child{ ???display:none; } .nav?li:last-child{ ???display:none; }
如代碼所示
2018-06-20
舉報
2018-11-13
.nav?li::before和.nav?li:first-child::before
2018-06-21
.nav li:after{
? ?content: '';
? ? ? ? ? ? position: absolute; width: 1px; height: 13px; top: 18px; right: 0;
? ? ? ? ? ? background-image: linear-gradient(to right, rgba(255,255,255,.5), grey);
? ? ? ? ? ??
? ? ? ? }?