我需要使用纯CSS在类module-content
后面设置一个URL。这段代码不起作用,但基本上我需要在content: '' attr(href);
里设置自定义链接Custom·Link
。
<div class="module-content">
<div class="aidanews2" style="clear: both;">
<div class="aidanews2_art aidacat_2 aidapage105 hidepiece odd first" style="clear: both; display: block;">
<div class="aidanews2_art aidacat_2 aidapage105 hidepiece even last" style="clear: both; display: block;">
</div>
<div class="aidanews2_bottomlink">
<a href="/joomla/index.php">Custom·Link</a>
</div>
</div>
.moduletable>.module-content:after{
background: none repeat scroll 0 0 #050505;
content: ' ' attr(href);
}
未成功的Jquery尝试:
var a = $('.aidanews2_bottomlink').html();
var b = $('.top-1 > .moduletable > .module-content:after ').html(a);
/joomla/index.php
替换Custom·Link
吗? - Musa