現象:画像にもやがかかっていて、文字がぼやけてします
画像の中に文章を表示させたくて、
position: relative;
position: absolute;
を使用しました。
すると、文字がぼやけて見えてしまうようになり、文章側(h3)に「z-index: 1;」で設定してみても変わらずでした。
画像の真ん中あたりに文字がくると、ぼやけてしまい困っています。
何かいい方法をご存知でしたら、教えていただけると助かります。
よろしくお願いします。
html
1<section class="consept"> 2 3<div class="consept__wrap"> 4 5<div class="consept__contents"> 6<h2>CONSEPT</h2> 7<h3>不動産の名義変更を、<br>ネットで簡単に、安心価格で</h3> 8<p>---事務所が運営する<br> 9不動産名義変更/専用サイトは、<br> 10いかなる種類の不動産名義変更でも、ご相談頂けます。</p> 11</div> 12 13<div class="consept__img"> 14<img src="img/consept@2x.png" alt=""> 15</div> 16 17</div> 18 19</section> 20
css
1.consept { 2 height: 688px; 3 margin: 103px 0 98px 0; 4} 5 6.consept__wrap { 7 position: relative; 8 max-width: 1280px; 9 display: flex; 10 margin: 0 auto; 11 padding-top: 80px; 12 padding-left: 190px; 13} 14 15 16.consept__contents h2 { 17 display: inline-block; 18 font-size: 24px; 19 line-height: 1.5; 20 letter-spacing: 0.1px; 21 color: #04B1B7; 22 border-bottom: 2px solid #04B1B7; 23 width: 28px; 24 padding-bottom: 9px; 25} 26 27.consept__contents h3 { 28 font-size: 40px; 29 line-height: 1.6; 30 letter-spacing: 5px; 31 color: #333333; 32 z-index: 1; 33} 34 35.consept__contents p { 36 font-size: 16px; 37 line-height: 1.8; 38 letter-spacing: 0.1px; 39 color: #333333; 40} 41 42.consept__img { 43 position: absolute; 44 top: 0; 45 right: 0; 46} 47 48.consept__img img { 49 width: 880px; 50 height: 487px; 51}

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2021/08/05 10:01