0
私はデスクトップ上で見た目がよく、テキストがモバイル上で正しく整列されていません。画像の背景は、上に余白/余白があり、段落テキストの後ろに押し下げられているようです。 あなたがここにWebページを見ることができます:ここhttp://cuttingedgeconversions.com/ebook/モバイルの背景画像がテキストと揃っていない
は、Webページのコードです:
<header class="mobileBackground masthead">
<div class="intro-body">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h1 style="font-size:50px" class="brand-heading">Free eBook: "How to Date in the Marriage Zone"</h1>
<!--<p class="intro-text marginP">
Learn The 5 Essential Keys to Attracting the Love</i>
</p>-->
<!--<a href="#about" class="btn btn-circle js-scroll-trigger">
<i class="fa fa-angle-double-down animated"></i>
</a>-->
</div>
<br /><br /><br />
<div style="width: 100%">
<span style="font-family: Arial; font-size: 26px; font-style: italic">What if you could wake up every single day next to the man of your dreams?<br />
A man that supported you?<br />
Where you didn’t need to choose between your needs and his needs?<br />
Where you could love without fear? You felt safe, confident, and secure from
the very beginning of the relationship?<br />
</span>
<img height="400" width="300" src="e-book.png" />
</div>
<a style="color: #ffffff;margin: 0 auto; margin-top: 20px; margin-bottom: 20px; font-size: 18px" href="#" class="myButton btn btn-default">I am ready for love<br />Register for FREE Webinar</a>
<br /><br />
</div>
</div>
</div>
</header>
あなたが私に与えた新しいクラスを試しましたが、まだ正しく表示されていません(あなたはウェブページをリフレッシュすると見ることができます)。私は元々そこにメディアクエリを持っていましたが、ここでは私が今使っている完全なCSSクラスです: '@media(最大幅:600px){ .mobileBackground { background:url(" ../ img/intro-bg-small.jpg ")repeat-yボトムセンタースクロール; margin-top:0; background-size:contains; } ' – Tom
あなたは良いスタートである絵にパディングをもう持っていません。イメージの位置を移動する場合は、 'background-position'プロパティを使用できます。あなたのケースでは、イメージを一番上から始めるには、 'background-position:0 88px;'を使ってください。ここで何を達成しようとしているのか分かりません。 – yofisim
バックグラウンドポジションは私が必要とするプロパティです、ありがとうございます! – Tom