これらは2つのdiv's
と1つのテキストを持つdiv
です。もう1つは画像のみの画像です。テキストコンテンツの2つのdivとイメージのあるdivの両方
私はdiv
画像は小さくなり、ビューポートと、それは私が両方div
は、メディアクエリを使用せずに同じ高さのままにしたい増加にテキストを持つdiv要素の少しでも変更し、Flexはそこに任意のですオプションを使用してjavascript ??
<div class="book cf">
<div class="book-content">
<span class="title">world ocean summit 2017</span>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Delectus aspernatur similique, aperiam suscipit autem
doloribus quos accusantium,
</p>
<a href="#" target="_blank" title="Read More">
read more
</a>
<a href="#" target="_blank" title="Book Now">
book now
</a>
<div class="location">
<span class="icons">
<i class="fa fa-map-o" aria-hidden="true"></i>
</span>
<span class="text">
bali, indonesia
</span>
<span class="icons">
<i class="fa fa-calendar" aria-hidden="true"></i>
</span>
<span class="text">
february 22nd-24th 2017
</span>
</div>
</div>
<div class="book-image">
<img src="http://via.placeholder.com/643x389" alt="Man" />
</div>
</div>
.book-content {
width: 50%;
float: left;
background-color: #5eabd7;
text-align: center;
}
.book-content .title {
padding-top: 60px;
display: block;
color: #fff;
font-weight: bold;
font-size: 25px;
text-transform: uppercase;
}
.book-content p {
padding: 7% 8%;
color: #fff;
font-size: 13px;
line-height: 22px;
}
.book-content a {
padding: 2% 6%;
display: inline-block;
color: #000;
font-size: 14px;
font-weight: 500;
text-decoration: none;
text-transform: uppercase;
}
.book-content p+a { background-color: #ffffff; }
a[title^="Book"] { background-color: #ffe401; }
.book-image {
width: 50%;
float: right;
}
.book-image img { width: 100%; }
画像へのリンクではなく、**関連**のコードとマークアップを投稿してください。好ましくは、[**最小、完全、かつ確認可能な例**]です(https://stackoverflow.com)。/help/mcve)を使用して問題を示します。 [**質問の際にコードの画像をアップロードしないでください**](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when -asking-a-question/285557#285557)を参照してください。 – Nope