青いdiv-spanをdiv-span-wellに垂直に重ねようとしています。添付の画像を参照してください。これはブートストラップで可能ですか?
7325 次
2 に答える
3
TBSだけでなく、どのCSSでも実行できます。
たとえば、次のようにHTMLがあります。
<div class="head-with-overlay">
<h3>Lorem</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
CSSは次のように使用できます。
.head-with-overlay {position: relative; padding: 50px 15px 15px; border: 1px solid #ccc; margin: 10px;}
.head-with-overlay h3 {position: absolute; padding: 5px 10px; background: #00f; top: -10px; left: 50%; width: 50px; text-align: center; color: #fff; margin-left: -25px;}
フィドル: http: //jsfiddle.net/thhPg/
于 2012-12-02T03:33:01.070 に答える
3
divをオーバーラップする最も簡単な方法は、属性、、、およびを組み合わせて使用することposition: relative
です。これがJSFiddleの簡単な例です。top
right
bottom
left
BootstrapはCSSにコンパイルされるだけなので、Twitter Bootstrapで実行できることはすべて、CSSで実行できます。その逆も同様です。
于 2012-12-02T03:41:40.150 に答える