[英]Change Parent div Height depending on child absolute div height using javascript
[英]Javascript - Change height in <div style> depending on the height of image(s) in the div or completely remove it?
正如標題所說。 現在,每個簽名(在論壇上)div都有:
<div style='height:Xpx;overflow:scroll'> (X = depends on each signature due to the image heights shifting)
而且我想更改高度,這樣我就不必滾動每個簽名,而是直接顯示所有圖像。 這是簽名的右側:
http://puu.sh/4xOW7.jpg (由於沒有10個代表而無法使用website-image-feature)
然后我進行了測試,並設法做到了:
http://puu.sh/4xPar.jpg (更深處)
就像這樣
http://puu.sh/4xPco.jpg (最多可以發布2個鏈接-_-)
我還試圖刪除overflow:scroll,對其進行更改,等等。 (也嘗試刪除高度:等),但我只是無法刪除滾動條就無法使它正常顯示。 我非常感謝您的幫助! :)
而不是style="height:250px;overflow: auto;"
您需要style="display:inline;"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.