如何在文本元素和 <a>
之间提供不间断的空格标记所有嵌套在 span
中的内容
<span>
<label> this is xyz</label>
<a href ="">
</span>
我想使用CSS而不是 
来做到这一点;
我还尝试使用 white-space
的所有组合,但效果并不好。
最佳答案
请使用以下 CSS 和 HTML:--
HTML:-
<span>xyz<a href="http:ggogle.com">LINK</a></span>
CSS:-
a:before
{
content:" ";
}
a{text-decoration:none;}
看 fiddle :-- http://jsfiddle.net/npsingh/TJhh7/2/show
关于css - 文本和 <a> 之间的不间断空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18965331/