css怎样设置一条线中间亮两边暗

css怎样设置一条线中间亮两边暗


眼眸繁星
浏览 1588回答 2
2回答

撒科打诨

&nbsp; &nbsp;拿走不谢!!!<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Title</title><style>.horizontal-line {position: relative;margin: 75px 0;width: 100%;height: 1px;}.horizontal-line:before {content: "";position: absolute;background-image: linear-gradient(to left, #777, transparent);left: 10%;right: 50%;height: 1px;}.horizontal-line:after {content: "";position: absolute;background-image: linear-gradient(to right, #777, transparent);left: 50%;right: 10%;height: 1px;}</style></head><body><div class="horizontal-line"></div></body></html>

慕田峪9158850

.obj::after {content: "";height: 0px;width: 100%;display: block;border: 1px solid #A9A9A9;margin: 5% auto;border-radius: 50%}
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

CSS3