[英]How to insert a line break <br> after every <a> tag?
I want to insert a line break <br>
after every <a>
tag using CSS. 我想插入一个换行符
<br>
每一个后<a>
使用CSS标签。 I tried 我试过了
a {
display:inline;
}
a:after {
content:"\a";
white-space: pre;
}
but it does not work, I tested it in Chrome? 但它不起作用,我在Chrome中测试过?
My Question 我的问题
How to insert a line break <br>
after every <a>
using CSS? 如何插入一个换行符
<br>
后,每<a>
使用CSS?
You can't do this with CSS - that isn't what it was intended for. 你不能用CSS做到这一点 - 这不是它的目的。
You can use Javascript to do this. 您可以使用Javascript来执行此操作。
That is obvious that you can not define content by using css. 很明显,您无法使用css定义内容。 You can use simple Jquery
$("a").after("html here");
您可以使用简单的Jquery
$("a").after("html here");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.