0
我想創建一組框,其中開始時有幾個信息,當懸停時顯示更多信息。 我實現了它,但是我遇到了與其他盒子的位置有關的問題。每次我將鼠標懸停在一個框上時,其他人都會改變其位置,因爲我在懸停時應用了高度和寬度。它正常工作,如果我評論懸停高度和寬度,但我需要在所有的時間如何使用高度變換css3
這裏保持去的box-shadow,你可以檢查測試:https://jsfiddle.net/p4av5ejv/
HTML:
<div class="partnerLlistat">
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: [email protected]</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: [email protected]</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: [email protected]</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: [email protected]</p>
<p id="offer">Field8: test test</p>
</div>
</div>
</div>
CSS:
我無法定義CSS代碼,因爲我不知道如何格式化才能生效。檢查jsFiddle鏈接。
任何人都可以幫助我嗎?,我GOOGLE了很多,堆棧溢出很多,但沒有什麼是我需要的。
謝謝你的時間!