如何控制破折号到边框的长度,而不使用带有CSS的图像? [英] How to control length of the dash to the border without using image with css only?
本文介绍了如何控制破折号到边框的长度,而不使用带有CSS的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要更改边框底部破折号的长度。我想让每个破折号的长度为30px。
I need to change the length of the dash in a border bottom. I want to make the length of each dash 30px. Is there any chance to do this without using any images?
推荐答案
如果没有任何图片,这是不可能的。但是无需加载任何图片即可使用CSS渐变(基本上是生成的图片):
Without any images it's impossible. But it can be done without loading any images — with CSS gradients (which are basically generated images):
background: linear-gradient(to right, currentColor 0%, currentColor 50%, transparent 50%, transparent 100%) repeat-x left bottom;
background-size: 60px 1px;
这篇关于如何控制破折号到边框的长度,而不使用带有CSS的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文