在 Tumblr 中按每个帖子定义风格
我创建了以下样式作为博客文章的标题。
h4 {font-family: "futura", "helvetica", sans-serif; position:center; line-height:56px;
font-size:38px; letter-spacing:1px; font-weight:bold; text-align:center; padding-
right:20px; padding-left:20px; color:white;border-style:solid;
border-top-width: 22px; border-bottom-width: 0px; border-left-width:0px; border-right-
width:0px; border-top-color:#F15B4C; border-bottom-color:#F15B4C; background-
color:#F15B4C;}
我正在开发的网站将展示几条艺术品“链”。每个链条都由艺术家随着时间的推移重新加工同一件艺术品而连接在一起。我想用标题的独特背景颜色来区分每个链。
我希望能够以某种方式更改队列中每个帖子的颜色,但由于这是一个被黑的 Tumblr 主题,我能做的事情受到限制。关于如何在 Tumblr 的混合 HTML/CSS 样式中创建其他样式有什么建议吗?
I created the following style to act as a header for blog posts.
h4 {font-family: "futura", "helvetica", sans-serif; position:center; line-height:56px;
font-size:38px; letter-spacing:1px; font-weight:bold; text-align:center; padding-
right:20px; padding-left:20px; color:white;border-style:solid;
border-top-width: 22px; border-bottom-width: 0px; border-left-width:0px; border-right-
width:0px; border-top-color:#F15B4C; border-bottom-color:#F15B4C; background-
color:#F15B4C;}
The site I am working on will feature several "chains" of artwork. Each chain is linked together by artists reworking the same piece of art over time. I want to differentiate each chain with a unique background color for the header.
I'd like to be able to somehow change the color for each post in line, but since this is a hacked Tumblr theme I am limited on how much I can do. Any recommendation on how to create additional styles in Tumblr's mashed up HTML/CSS style?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过标签来做到这一点。
这应该将类“chain3”应用于该标题的类。
然后在你的 CSS 中...
.caption.chain3 {background-color:#0000ff;}
当然,这一切都取决于你的标签是 CSS 可以解释为类声明的字符串。像“Friendship Is Magic”这样的标签不能是 CSS 类。
You could possibly do it through tags.
<div class="caption {block:Tags} {Tag}{/block:Tags}" >
That should apply the class "chain3" to your classes for that caption.
and then in your CSS...
.caption.chain3 {background-color:#0000ff;}
This all depends on your tags being strings that CSS can interpret as class declarations, of course. A tag like "Friendship Is Magic" can't be a CSS class.