このような「背景テキスト」が必要です>(例)
ページを下にスクロールしてもテキストが上がらない。
背景画像の私の.css
html,
body {
font-family: 'Lato', sans-serif;
height: 100%;
background: url(../img/image-bg-jpg.jpg) center center no-repeat fixed;
webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
ブートストラップ3.3を使用しています
もし私があなたなら、画像タグを付けて画像を入れ、次のように固定して配置します。 <img class="img" /> .img{ min-width: 100%; min- height: 100%; position: fixed; z-index: 0; }
次に、テキストをその下のdivに次のように配置します。
<div class="div">text goes here</div>
.div{ margin-top: 100%;}
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加