ヒーローイメージ
ブレイクポイント
プレビュー
コード
CSS
.hero {
background-image: url(/wp-content/uploads/2019/03/mv_pc.jpg);
width: 100vw;
height: 70vw;
background-size: 100%;
background-position: center;
background-repeat: no-repeat;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.hero:after {
position: absolute;
top: 0;
left: 0;
content: "";
display: block;
width: 100%;
height: 100%;
background: cadetblue;
opacity: 0.8;
z-index: 1;
}
.hero h1 {
font-size: 62px;
color: #fff;
position: relative;
z-index: 2;
}
/*---- ここから下にPC・スマホ共用CSSを記述ください ----*/
/*---- ここから下にスマホ用CSSを記述ください ----*/
@media screen and (max-width: 320px) {
}
HTML
<