CSS小点领导有织地不很细背景 [英] CSS Dot Leaders With Textured Background

查看:194
本文介绍了CSS小点领导有织地不很细背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在带纹理的背景上添加CSS点引线?

How do I add CSS dot leaders over a textured background?

我熟悉在元素之间添加点引线,但我找不到一个方法让我

I'm familiar with adding dot leaders between elements, but I cannot find a method that lets me add them when the text is over a textured background.

但是,由于菜单是动态的,元素不会有一个永久的位置。

However, because the menu is dynamic, the elements won't have a permanent location. Since they aren't permanant, I cannot use a background image to make my dots work.

推荐答案

您可以使用浮动和 c>

You can use floats and the behavior of display:block;overflow:hidden.

如果浮动(左和右)位于块与上面的样式,他们会使这个块的宽度等于父的宽度减去它们的宽度。

If the floats (left and right) are placed before the block with the style above, they would make this block the width equal to the width of the parent minus their width.

因此,这里是在dabblet的生活示例 - 你可以实现它几乎任何标记和使用任何风格(背景代替虚线边框)领导元素。

So, here is the live example at dabblet — you can achieve it with almost any markup and use any style (background instead of dotted border) on the leader element.

这篇关于CSS小点领导有织地不很细背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆