我使用相同的類選擇器,但我不明白爲什麼它的行爲不同。爲什麼我的hr標籤在兩個地方表現不同?
這裏是我的網站:
在一審的利潤率罰款;在第二種情況下,不是。
<!-- Side Navigation__________________________________-->
<div class="side_nav_wrapper">
<div class="side_nav_photos" id="side_wrapper_text">photos</div>
<div class="side_nav_about" id="side_wrapper_text">about</div>
<div class="side_nav_writing" id="side_wrapper_text" >writing</div>
<div class="side_nav_contact" id="side_wrapper_text">contact</div>
</div>
<!-- CONTENT____________________________________________-->
<div class="content_wrapper">
<!-- Photo __________________________________________-->
<div class="home_photo">
</div>
<hr class="line">
<!-- About___________________________________________________-->
<div class="home_text">
<p>Emma Carmichael is a writer and editor based in Brooklyn, NY, although she hails from Brattleboro, VT. Emma graduated from Vassar College in 2010 with a degree in Urban Studies; the theme of her thesis about contextualizing female rappers, ETC.
</p>
</div>
<hr class="line">
(另外,我想不通爲什麼這個類是不適用:)
#side_wrapper_text a:link{
font-family: 'Playfair Display', sans-serif;
font-size: 20px;
font-weight: 100;
color:rgba (255,255,255,1);
text-decoration: none;
text-align: center;
letter-spacing:0.2em;
}
<div class="side_nav_wrapper">
<div class="side_nav_photos" id="side_wrapper_text">photos</div>
<div class="side_nav_about" id="side_wrapper_text">about</div>
<div class="side_nav_writing" id="side_wrapper_text" >writing</div>
<div class="side_nav_contact" id="side_wrapper_text">contact</div>
</div>
謝謝!!
謝謝!但是,如果我拿走了float:left作爲home_text,那麼這個元素的行爲不會奇怪嗎?所以,爲了解決這個問題,我在家庭文本之後添加更清晰的div,並將該類添加到我的css中? – Claire 2013-03-26 19:47:00
我只是試過,它是一樣的...... – Claire 2013-03-26 19:48:37
然後你搞砸了。在'
'後面加''可以解決您的保證金問題。 – 2013-03-26 19:50:28