-
想要居中效果,css class:short-center-underline -
想要左对齐效果,css class:short-left-underline
/* Short center underline */.short-center-underline {position: relative;}.short-center-underline::after {content: '';display: block;width: 200px;height: 3.5px;background-color: #bab6b5;position: absolute;left: 50%;transform: translateX(-50%);bottom: -15px;}
/* short left underline */.short-left-underline {position: relative;display: inline-block;}.short-left-underline::after {content: '';display: block;width: 75px;height: 2px;background-color: #bab6b5;position: absolute;left: 0;bottom: -15px;}
这就是《WordPress页面设计:用css代码在区块编辑器中给文字加下划线,自定义样式》的内容了。老汤将会持续给到一些实用的网站设计的代码。有网站定制和SEO需求的朋友们可以在文下留言。
往期内容:
WordPress网站仪表板定制 - 让页面列表显示特色图片 Feature picture

