【发布时间】:2013-06-28 23:44:48
【问题描述】:
这是我的网站:http://oldtimesdaily.tumblr.com/
在我的索引中,我的帖子的标题是链接,而单个帖子没有。但我希望它们看起来相同,所以我将 class="Title" 添加到两者中,但它仅适用于索引页面。
这里是代码
CSS
.Post a.Title {
display:block;
line-height: 1.4;
color: #222;
margin-bottom:22px;
font-family:QuicksandBold, Helvetica, Arial, sans-serif;
margin: 0px 25px 10px; /* Post Title */
font-weight: bold;
letter-spacing: 2px;
text-transform:uppercase;
text-decoration:none;
border-bottom:0px;
}
.Post a.Title:hover {
color: #300000 ;
}
.Post.Single a.Title {
margin-bottom:11px;
}
HTML
<div class="Text">
{block:Title}
{block:IndexPage}
<a href="{Permalink}" target="_blank" class="Title">{Title}</a>
{/block:IndexPage}
{block:PermalinkPage}
<span class="Title">{Title}</span>
{/block:PermalinkPage}
{/block:Title}
【问题讨论】:
-
(class 和 id 的第一个字母不能是大写也不能是数字,修正它,否则某些浏览器不会应用它们)
-
哦,谢谢,不知道)
标签: css class hyperlink title tumblr