前提・ 実現したいこと
フリー素材からダウンロードした異なるサイズの画像をサイズを揃えて表示させたいのですが
どのようにしたらよろしいでしょうか?
HTMLここに言語を入力
コード
</body> </html><main> <div id="mainvisual"> <img src="img/mainvisual.jpg" alt="テキストテキストテキスト"> </div> <section id="about" class="wrapper"> <h2 class="section-title">About</h2> <div class="content"> <img src="img/about.jpg" alt="テキストテキストテキスト"> <div class="text"> <h3 class="content-title">YAMADA TARO</h3> <p> テキストテキストテキストテキストテキストテキストテキスト<br> テキストテキストテキストテキストテキストテキストテキスト<br> テキストテキストテキストテキストテキストテキストテキスト </p> </div> </div> </section> <section id="bicycle" class="wrapper"> <h2 class="section-title">Bicycle</h2> <ul> <li> <img src="img/bicycle 1.jpg" alt="テキストテキストテキスト"> <h3 class="content-title">タイトルタイトル</h3> <p>テキストテキストテキスト</p> </li> <li> <img src="img/bicycles 2.jpg" alt="テキストテキストテキスト"> <h3 class="content-title">タイトルタイトル</h3> <p>テキストテキストテキスト</p> </li> <li> <img src="img/bicycle 3.jpg" alt="テキストテキストテキスト"> <h3 class="content-title">タイトルタイトル</h3> <p>テキストテキストテキスト</p> </li> </ul> </section> </main> <footer id="footer"> <p>© 2020 Profile</p> </footer>
CSSここに言語を入力
コード
html {
font-size: 100%;
}
body {
color: #383e45;
font-size: 0.9rem;
}
a {
text-decoration: none;
}
img {
max-width: 100%;
}
li {
list-style: none;
}
.site-title {
width: 120px;
line-height: 1px;
padding: 10px 0;
}
.site-title a {
display: block;
}
.section-title {
display: inline-block;
font-size: 2rem;
text-align: center;
margin-bottom: 60px;
border-bottom: solid 1px #383e45;
}
.content-title {
font-size: 1rem;
margin: 10px 0;
}
.wrapper {
max-width: 960px;
margin: 0 auto 100px auto;
padding: 0 4%;
text-align: center;
}
#header {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 auto;
}
#header ul {
display: flex;
padding: 10px 0;
}
#header li {
margin-left: 30px;
}
#header li a {
color: #24292e;
}
#header li a:hover {
opacity: 0.7;
}
#mainvisual {
margin-bottom: 80px;
}
#mainvisual img {
width: 100%;
max-width: 1920px;
height: 600px;
object-fit: cover;
}
#about .content {
display: flex;
justify-content: center;
align-items: center;
}
#about img {
width: 100px;
height: 100px;
border-radius: 50%;
margin-right: 30px;
}
#about .text {
text-align: left;
}
#bicycle ul {
display: flex;
justify-content: space-between;
}
#bicycle li {
width: 32%;
}
#footer {
font-size: 0.5rem;
padding: 10px 0;
text-align: center;
}
@media screen and (max-width: 600px) {
#mainvisual img {
height: calc(100vh - 60px);
}
#about .content {
flex-direction: column;
}
#about img {
margin-right: 0;
}
#bicycle ul {
flex-direction: column;
}
#bicycle li {
width: 100%;
margin-bottom: 30px;
}
}
試したこと
heightの数値等を変えて試してみましたが効果はありませんでした。
teratail内同様の質問、他同様のサイトを閲覧しましたが、この問題を解決するに至りませんでした。
どなたかご教授いただければ幸いです。