HTLM
<div class="widget center">
<div class="blur"></div>
<div class="blur blur2"></div>
<div class="text">
<h1 class="">Whereas disregard and contempt for human rights have resulted</h1>
<p>Go ahead, resize me.</p>
</div>
<div class="blur_line"></div>
</div>
CSS
@import url('https://fonts.googleapis.com/css2?family=Cinzel&family=Permanent+Marker&display=swap');
body {
background: url("https://images.unsplash.com/photo-1593418270780-4c6e6b7eb5af?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1528&q=80")
no-repeat center center fixed;
background-size: cover;
}
.blur_line{
border-top: 1px solid rgb(197 255 251 / 61%);
position:absolute;
top:50%;
left:0;
width: 100%;
}
.blur {
background: url("https://images.unsplash.com/photo-1593418270780-4c6e6b7eb5af?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1528&q=80") no-repeat center center fixed;
background-size: cover;
overflow: hidden;
filter: blur(9px);
position: absolute;
height: 50%;
left: -50px;
right: -50px;
bottom: 0;
}
.blur2{
filter: blur(8px);
}
.widget {
height: 100%;
width: 100%;
overflow: hidden;
}
.center {
position: absolute;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
/* NOT REQUIRED */
.text {
height: 200px;
width: 340px;
position: absolute;
bottom: 20px;
left: 20px;
}
.text h1 {
text-shadow: 1px 1px rgba(0, 0, 0, 0.1);
color: #ffffff;
margin-top: 57px;
font-family: "Cinzel", serif;
font-size: 18px;
font-weight:normal;
}
.text p {
color: #ffffff;
text-shadow: 1px 1px rgba(0, 0, 0, 0.1);
margin-top: 0px;
font-family: "Cinzel", serif;
font-weight: 400;
font-size: 16px;
}
728x90
반응형
'퍼블리싱' 카테고리의 다른 글
css background 속성 / 단축 속성 / 주의점 (0) | 2023.06.26 |
---|---|
모달팝업, 모달창, 이미지 슬라이드 제이쿼리 플러그인 - 무료(MIT) (0) | 2023.06.16 |
크리스마스, 눈 내리는 효과 만들기 (자바스크립트) (0) | 2022.12.22 |
CSS 이미지사이즈 맞추기 - object-fit & background 비교 (0) | 2022.12.21 |
[css] flex로 간단하게 수직&수평 가운데 정렬 (0) | 2022.12.20 |
댓글