2

親コンテナーの計算された高さが動的コンテンツのために 336px を超えたときに、絶対配置要素 (「続きを読む」リンク) を表示したいと思います。続きを読むリンクの祖父母コンテナには、高さが 336px に設定され、オーバーフローが隠されています。display: none から display: ブロックに変更する read more リンクに追加したいクラスがあります。私はJSが初めてなので、助けていただければ幸いです。

http://jsfiddle.net/sueanna/FHhMG/

<style>

body {font-family: arial; font-size: 16px;}

p {line-height: 24px; margin:0 0 24px;}

span {display: none; background: #fff;  bottom: 0; line-height: 24px; position: absolute; width: 100%;}

.foo {display: block;}

.frame {height: 336px; overflow: hidden; position:relative;}

</style>

<div class="frame">
<div class="content">
<p>
Wonder Woman is a fictional DC Comics superheroine 
created by American psychologist and writer William Moulton Marston. 
She first appeared in All Star Comics #8 (December–January 1941). 
The Wonder Woman title has been published by DC Comics almost continuously 
except for a brief hiatus in 1986.[1] Her depiction as a heroine 
fighting for justice, love, peace, and sexual equality has also 
led to Wonder Woman being widely considered a feminist icon.
</p>

<p>
During the Silver Age, under writer Robert Kanigher, Wonder Woman's
origin was revamped,[19] along with other characters'. 
The new origin story increased the character's Hellenic and mythological 
roots: receiving the blessing of each deity in her crib, Diana is 
destined to become "beautiful as Aphrodite, wise as Athena, as 
strong as Hercules, and as swift as Hermes."
</p>

<span>read more</span>
</div>
</div>

ありがとう、

訴える

4

1 に答える 1