如何设置重复x和滚动背景图像的长度和位置?
我有一个要设置的背景图像。它是输入值下方的一条红线。
background-attachment:scroll;
background-color:#FFFFFF;
background-image:url("../images/errorLine.gif");
background-position:left bottom;
background-repeat:repeat-x;
输入值类似于“123; 456; 789;”。红线覆盖了所有字符串,其长度与输入宽度相同。
有没有办法使红线只在“456;”下?
有没有办法用CSS来做呢?
多谢。
最好的问候,
瑞尼万卡
I have an to set background image. it is a red line under the input value.
background-attachment:scroll;
background-color:#FFFFFF;
background-image:url("../images/errorLine.gif");
background-position:left bottom;
background-repeat:repeat-x;
the input value is like "123; 456; 789;". the red line cover all the string, its length is the same as the input width.
Is there any way to make the red line only under the "456;"?
Is there anyway to do it by CSS?
Thanks a lot.
Best regards,
Ryanivanka
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不完全确定这就是您所需要的,但为什么不使用
border-bottom
呢?对于
display: inline
元素,边框将始终位于文本下方,并跨行换行。I'm not entirely sure this is what you need, but why not use
border-bottom
?for a
display: inline
element, the border will always be underneath the text, and wrap across lines.