嘿我正在为我未来的网站开发这个布局,但我无法修改id = titre因为我添加了一个带旋转变换的容器div .....这里是代码
<style type="text/css">
body {
background-color: white;
}
.rotate {
/* Rotate div */
transform:rotate(-90deg);
-ms-transform:rotate(-90deg); /* IE 9 */
-moz-transform:rotate(-90deg); /* Firefox */
-webkit-transform:rotate(-90deg); /* Safari and Chrome */
-o-transform:rotate(-90deg); /* Opera */
background-color: transparent;
position: fixed;
margin-left: 1100px;
}
#titre {
font-family: baskerville;
color: blue;
text-transform: uppercase;
font-style: italic bold;
}
#description {
font-family: baskerville;
font-style: italic
text-transform: underline;
color: #000;
}
</style>
<div class="rotate"> <!--Bloc devant aller à droite -->
<div id="titre">
<h1>{Title}</h1>
</div>
<div id=description">
{block:Description}
<p id="description">{Description}</p>
{/block:Description}
</div>
</div>
你能看出我的问题在哪里吗?
答案 0 :(得分:2)
html元素中的ID应该是唯一的。
你有2个元素,id = description。
使用:
class="description"
代替。 (如果要将样式应用于多个元素)
答案 1 :(得分:0)
对同一页面上的两个不同元素使用相同的ID是一个很大的禁忌。
为他们提供唯一ID,并为他们提供一个通用的匹配类。
class="description"