사이트 만들기 _ 이미지텍스트 유형01
■ 그림으로 미리보기🎨
![](https://blog.kakaocdn.net/dn/rsdJB/btrLa4JBjHB/jRTcmK2XpUCBMgP48jT37k/img.jpg)
■ 핵심내용✍
<h2 class="blind">유용한 사이트 살펴보기</h2>
.blind{
position: absolute;
clip: rect(0 0 0 0);
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
}
.blind{
position: absolute;
clip: rect(0 0 0 0);
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
}
대제목에 블라인드 효과를 주어 감추었습니다.큰 주제이지만 구조상 밑으로 내려가니깐 웹표준을 준수하기 위해서 이렇게 한게 아닐까...?싶습니다.
.imgText__txt ul li::before{
content: '';
width: 5px;
height: 5px;
border-radius: 50%;
position: absolute;
left: 5px;
top: 9px;
background: #666;
}
li태그에서 기본 제공하는 아이콘을 사용하지 않고 ::before가상요소를 통해서 좀 더 이쁜 단락기호로 표시해주었습니다. 그리고 이런 속성으로 부여하면 글자와 겹치게 되는데 li에 'padding-left'를 주어 배치를 해주었습니다.
CSS 속성
/* fonts */
@import url('https://webfontworld.github.io/NexonLv1Gothic/NexonLv1Gothic.css');
.nexon {
font-family: "NexonLv1Gothic";
font-weight: 400;
}
/* 리셋 */
*{
margin: 0;
padding: 0;
}
a{
text-decoration: none;
color: #000;
}
img {
width: 100%;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
li {
list-style: none;
}
.blind{
position: absolute;
clip: rect(0 0 0 0);
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
}
/* common */
.container {
width: 1160px;
padding: 0 20px;
margin: 0 auto;
min-width: 1160px;
}
.section {
padding: 120px 0;
}
.section > h2 {
font-size: 50px;
line-height: 1;
text-align: center;
margin-bottom: 20px;
}
.section > p {
font-size: 22px;
font-weight: 300;
color: #666;
text-align: center;
margin-bottom: 70px;
}
.gray {
background-color: #f5f5f5;
}
/* imgTextType */
.imgText__inner {
display: flex;
justify-content: space-between;
}
.imgText__inner > div {
width: 32%;
height: 500px;
}
.imgText__txt {}
.imgText__txt span {
font-size: 16px;
color: #666;
text-decoration: underline;
text-underline-position: under;
margin-bottom: 20px;
display: block;
}
.imgText__txt h3 {
font-size: 50px;
font-weight: 300;
word-break: keep-all;
line-height: 1.4;
margin-bottom: 20px;
}
.imgText__txt p {
font-size: 18px;
font-weight: 300;
line-height: 1.5;
color: #666;
margin-bottom: 10px;
}
.imgText__txt ul {
font-size: 18px;
font-weight: 300;
line-height: 1.6;
}
.imgText__txt ul li {
position: relative;
padding-left: 20px;
}
.imgText__txt ul li a {
color: #666;
}
.imgText__txt ul li::before{
content: '';
width: 5px;
height: 5px;
border-radius: 50%;
position: absolute;
left: 5px;
top: 9px;
background: #666;
}
.imgText__img {
border-radius: 10px;
position: relative;
}
.imgText__img a{
position: absolute;
left: 30px;
bottom: 30px;
background-color: #7c2b39;
color: white;
font-size: 18px;
padding: 10px 30px;
border-radius: 30px;
display: inline-block;
}
.imgText__img a.blue{
background-color: #2b387c;
}
.imgText__img.img1 {
background: url(img/imgText_bg01.jpg) no-repeat center / cover;
}
.imgText__img.img2 {
background: url(img/imgText_bg02.jpg) no-repeat center / cover;
}
HTML 속성
<section id="imgTextType" class="imgText__wrap nexon section gray">
<h2 class="blind">유용한 사이트 살펴보기</h2>
<div class="imgText__inner container">
<div class="imgText__txt">
<span>이미지 텍스트 유형01</span>
<h3>유용한 사이트 살펴보기</h3>
<p>
웹디자이너, 웹 퍼블리셔, 프론트엔드 개발자를 위한 유용한 사이트입니다.
</p>
<ul>
<li><a href="/">튜토리얼 사이트</a></li>
<li><a href="/">레퍼런스 사이트</a></li>
<li><a href="/">웹폰트 사이트</a></li>
<li><a href="/">CSS 사이트</a></li>
<li><a href="/">WebGL 사이트</a></li>
<li><a href="/">Youtube 사이트</a></li>
</ul>
</div>
<div class="imgText__img img1">
<a href="/">레퍼런스 사이트</a>
</div>
<div class="imgText__img img2">
<a href="/" class="blue">튜토리얼 사이트</a>
</div>
</div>
</section>
결과보기
728x90
댓글