Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
218 views
in Technique[技术] by (71.8m points)

如何设置底部边框的长度?

感觉底部的横线太长了 想让它短一点应该怎么办?border-bottom-width试了 不行 这个控制的是它的高度 不能控制它的长度
image

.test{
    border-bottom: 5px solid #F0831F;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

自己再调整下

.test{
    position:relative;
}
.test:before { content: ""; position: absolute; left: 0; bottom: 0; width: 50%; height: 1px; border-bottom: 1px dashed #888888; box-sizing: border-box; }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.7k users

...