index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://kit.fontawesome.com/9fc5dd465c.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style2.css">
</head>
<body>
<!-- 상단영역 -->
<div id="header">
<div class="inner_wrap">
<div class="logo_area">
<h1>로고</h1>
<ul>
<li><a href="#">개인</a></li>
<li><a href="#">기업</a></li>
</ul>
</div>
<div class="nav">
<ul>
<li><a href="#">MY삼성생명</a></li>
<li><a href="#">전체상품</a></li>
<li><a href="#">라이프&</a></li>
<li><a href="#">고객센터</a></li>
</ul>
<div>
<ul>
<li><a href="#">로그인</a></li>
<li><a href="#">인증센터</a></li>
</ul>
</div>
<button><i class="fas fa-search"></i></button>
<button><i class="fas fa-bars"></i></button>
</div>
</div>
</div>
<!-- 상단영역 /-->
<!-- 메인영역 -->
<div id="main_content">
<!-- 비주얼 -->
<div class="inner_wrap clearboth" id="visual">
<!--왼쪽 로그인부분 -->
<div>
<div id="login">
<a href="#" class="login_button">삼성생명 로그인</a>
<ul class="btn_group clearboth">
<li><a href="#">인증센터</a></li>
<li><a href="#">이용등록</a></li>
</ul>
</div>
<ul class="clearboth" id="iconul">
<li><a href="#"><i><img src="images/icon01.png" alt=""></i><span>나의계약</span></a></li>
<li><a href="#"><i><img src="images/icon02.png" alt=""></i><span>보험금청구</span></a></li>
<li><a href="#"><i><img src="images/icon03.png" alt=""></i><span>보험료납입</span></a></li>
<li><a href="#"><i><img src="images/icon04.png" alt=""></i><span>보홈계약대출</span></a></li>
<li><a href="#"><i><img src="images/icon05.png" alt=""></i><span>변액펀드변경</span></a></li>
<li><a href="#"><i><img src="images/icon06.png" alt=""></i><span>분할/만기보험금</span></a></li>
<li><a href="#"><i><img src="images/icon07.png" alt=""></i><span>IPR가입</span></a></li>
<li><a href="#"><i><img src="images/icon08.png" alt=""></i><span>종합자산관리</span></a></li>
<li><a href="#"><i><img src="images/icon09.png" alt=""></i><span>다이렉트보험</span></a></li>
<li><a href="#"><i><img src="images/icon10.png" alt=""></i><span>소비자포털</span></a></li>
<li><a href="#"><i><img src="images/icon11.png" alt=""></i><span>컬설팅신청 동의라운지</span></a></li>
<li><a href="#"><i><img src="images/icon12.png" alt=""></i><span>회사지원 연금가입</span></a></li>
</ul>
</div>
<!--왼쪽 로그인부분 /-->
<!--오른쪽 이미지부분 -->
<div>
<div><img src="images/main_visual02.png" alt=""></div>
<h2>국가고객만족도 생명보험부문 1위</h2>
<p>고객님의 사랑으로 삼성생명이 2019년 NSCI 생명보험부문 16년 연속 1위를 수상하였습니다.</p>
</div>
<!--오른쪽 이미지부분 / -->
</div>
<!-- 비주얼 /-->
<!-- 보험상품 -->
<div id="insurance_story">
<div class="inner_wrap">
<h2 class="main_tit">소소한 일상 속 든든한 보험이야기<span>보험상품</span></h2>
<ul class="text-box clearboth">
<li class="story_box">
"돈보다 소중한 걸 지키려니 돈이 필요하구나."
</li>
<li class="story_box">
"매일 같이 등원하는 별이가 세상에서 제일 예쁘데요."
</li>
<li class="story_box">
"내 안에 살던 예술가가 깨어났어요."
</li>
<li class="story_box">
"아내가 이제 조신하게 살림하래요."
</li>
</ul>
</div>
<div class="link_div">
<ul>
<li>
<a href="">
<span><i class="fas fa-home"></i></span>
<p>종기/종신보험</p>
</a>
</li>
<li>
<a href="">
<span><i class="fas fa-heart"></i></span>
<p>종기/종신보험</p>
</a>
</li>
<li>
<a href="">
<span><i class="fas fa-piggy-bank"></i></span>
<p>연금/저축보험</p>
</a>
</li>
<li>
<a href="">
<span><i class="fas fa-seedling"></i></span>
<p>자녀보험</p>
</a>
</li>
<li>
<a href="">
<span><i class="fas fa-laptop"></i></span>
<p>다이렉트 보험</p>
</a>
</li>
</ul>
</div>
</div>
<!-- 보험상품 /-->
<!-- 라이프매거진 -->
<div id="life" class="inner_wrap">
<h2 class="main_tit">내 삶을 레밸업할 인생정보가 가득<span>라이프 매거진</span></h2>
<ul class="clearboth">
<li>
<img src="images/photo01.jpg" alt="">
<p>오늘을 살까? 내일을 준비할까?</p>
</li>
<li>
<img src="images/photo02.jpg" alt="">
<p>오늘을 살까? 내일을 준비할까?</p>
</li>
<li>
<img src="images/photo03.jpg" alt="">
<p>오늘을 살까? 내일을 준비할까?</p>
</li>
<li>
<img src="images/photo04.jpg" alt="">
<p>오늘을 살까? 내일을 준비할까?</p>
</li>
</ul>
</div>
<!-- 라이프매거진 /-->
<!-- 광고 -->
<div id="main_banner">
<div class="inner_wrap">
<ul class="clearboth">
<li class="clearboth">
<div>
<h3>나만의 보험찾기</h3>
<p>보장별, 인생시기별로<br> 내게 딱 맞는 보험을 찾아보세요.</p>
</div>
<span>
<img src="images/02icon02.png" alt="">
</span>
</li>
<li class="clearboth">
<div>
<h3>내보험 종합진단</h3>
<p>모든 보험사에 가입한<br> 내보험 다 모아 한번에 진단 받아보세요.</p>
</div>
<span>
<img src="images/02icon01.png" alt="">
</span>
</li>
</ul>
</div>
</div>
<!-- 광고 /-->
<!-- 커뮤니티 -->
<div class="inner_wrap clearboth" id="main_community">
<!-- 왼쪽 div-->
<div>
<h2 class="main_tit">자주묻는 질문</h2>
<ul>
<li><strong>Q</strong><span>이용등록이란 무엇인가요? 왜 해야 하나요?</span></li>
<li><strong>Q</strong><span>1회용 인증이란 무엇인요? </span></li>
<li><strong>Q</strong><span>보험금 청구는 어떻게 하나요?</span></li>
<li><strong>Q</strong><span>전자금융거래계좌 등록이나 변경은 어떻게 하나요?</span></li>
<li><strong>Q</strong><span>부활 보험료를 카드로 납입 할 수 있나요?</span></li>
<li><strong>Q</strong><span>자동이체 신청, 변경, 해지 절차를 알려주세요</span></li>
</ul>
</div>
<!-- 왼쪽 div /-->
<!-- 오른쪽 div-->
<div>
<div class="event">
<h2 class="main_tit">이벤트</h2>
<div>
<h3>이불밖은 위험해 보험이 필요해!</h3>
<p>인터넷으로 바로! 간단하게 가입</p>
</div>
</div>
<div class="notice">
<h2 class="main_tit">공지</h2>
<ul>
<li><span>2020.09.06</span>보험게약대출 가능 금액 상향 조정 안내</li>
<li><span>2020.09.04</span>새롭게 개편된 삼성생명은 '이용등록'부터 시작해 주세요</li>
<li><span>2020.09.01</span>(재공지) ios앱 최신 버전 업데이트 - 정상화</li>
</ul>
</div>
</div>
<!-- 오른쪽 div /-->
</div>
<!-- 커뮤니티 /-->
<!-- 추천상품 -->
<div class="inner_wrap" id="recommand">
<h2 class="main_tit">추천 금융상품</h2>
<ul class="clearboth">
<li>
<p>삼성생명 펀드 전문가가 선정한 분기별 우수 펀드</p>
<strong>추천펀드</strong>
</li>
<li>
<p>필요할 때 바로바로 보장은 그래도 편리하게</p>
<strong>보험계약대출</strong>
</li>
<li>
<p>소중한 은퇴자산을 든든하게 지켜드리는</p>
<strong>퇴직연금</strong>
</li>
<li>
<p>아파트 구입 시 부족한 자금 생활에 필요한 가계자금</p>
<strong>주택담보대출</strong>
</li>
</ul>
</div>
<!-- 추천상품 /-->
</div>
<!-- 메인컨텐츠 /-->
<!-- 하단영역 -->
<div id="footer">
<div id="footer_menu">
<div class="inner_wrap">
<ul class="clearboth">
<li>약관/정책안내</li>
<li>안내/유의사항</li>
<li>각족신고정보</li>
<li>고객센터 1588-3114</li>
<li>패밀리/그룹사/업무시스템</li>
</ul>
</div>
</div>
<div id="footer_copy" class="inner_wrap">
<div class="clearboth">
<img src="images/footer_logo.png" alt="">
<ul class="clearboth">
<li><a href="#">개인정보 처리방침</a></li>
<li><a href="#">인증센터</a></li>
<li><a href="#">공시실</a></li>
<li><a href="#">소비자포털</a></li>
<li><a href="#">컨설턴트</a></li>
<li><a href="#">회사소개</a></li>
<li><a href="#">English</a></li>
</ul>
</div>
<address>
서울틀별시 서초구 서초대로 74길 11 삼성생명보험주식회사 대표이사 전영묵 사업자 등록번호 104-11-12345<br/>
(c) SAMSUNG LIFE INSURANCE.
</address>
</div>
</div>
<!-- 하단영역 /-->
</body>
</html>
reset.css
* { margin: 0; padding: 0; box-sizing: border-box;}
a {text-decoration: none; color:inherit; }
img { vertical-align: top; }
table {
border-collapse: collapse;
}
li { list-style: none;}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
address {
font-style: normal;
}
input, select {
outline: none;
}
style2.scss (95% 완성)
$black: #3c3c3c;
$dpadding: 10px;
$maincolor: #007aff;
$subcolor: #eaf4fe;
$subcolor2: #dfe6f9;
@mixin flexlayout($dir: row, $wrap: nowrap, $justify: space-between, $align: center) {
display: flex;
flex-flow: $dir $wrap;
justify-content: $justify;
align-items: $align;
}
.inner_wrap {
width: 100%;
max-width: 1200px;
margin: 0 auto;
}
#header {
border-bottom: 1px solid #ccc;
text-align: center;
div {
@include flexlayout();
height: 80px;
h1 {
background: url('../images/logo.png') center center/100% no-repeat;
width: 180px;
height: 40px;
font-size: 0;
margin-right: 20px;
}
}
.logo_area {
ul {
@include flexlayout();
border: 1px solid #ccc;
li {
line-height: 36px;
padding: 0 6px;
font-size: 13px;
&:nth-child(2) {
background: #ccc;
}
}
}
}
.nav {
> ul {
@include flexlayout();
li {
padding: 0 16px;
}
}
> div {
position: relative;
width: 70px;
height: 20px;
ul {
position: absolute;
top: 0;
left: 0;
width: 60px;
border: 1px solid #ccc;
font-size: 12px;
line-height: 22px;
&:hover {
border-color: $maincolor;
li {
&:nth-child(2) {
display: block;
}
}
}
li {
&:nth-child(2) {
display: none;
}
&:hover {
background: $maincolor;
a { color: #fff; }
}
}
}
}
}
}
#main_content {
#visual{
margin-top: 2%;
display: flex;
div:first-child {
float: left;
width: 30%;
#login {
text-align: center;
height: 150px;
background-color: $subcolor;
width: 100%;
border-radius: 5px;
padding-top: 20px;
padding-left: 15px;
.login_button {
width: 95%;
height: 50px;
background: $maincolor;
color: #fff;
border-radius: 5px;
padding-top: 12px;
font-size: 20px;
}
.btn_group {
display: flex;
width: 95%;
height: 50px;
color:$maincolor;
background: #fff;
border-radius: 5px;
justify-content: center;
align-items: center;
margin-top: 12px;
border: 1px solid $maincolor;
li:first-child {
border-right: 1px solid $maincolor;
line-height: 50px;
padding-right: 13%;
}
li:last-child {
line-height: 50px;
padding-left: 13%;
}
}
}
#iconul {
width: 100%;
li {
float: left;
width: 25%;
text-align: center;
span {
font-size: 14px;
}
}
}
display: flex;
flex-direction: column;
margin-right: 10%;
}
div:last-child {
text-align: center;
width: 70%;
display: flex;
flex-direction: column;
div {
width: 100%;
img {
width: 100%;
}
}
h2 {
font-size: 16px;
}
p {
font-size: 14px;
}
}
}
}
.clearboth {
&::after{
content: "";
display: block;
clear: both;
}
}
#insurance_story {
margin-top: $dpadding *2;
background: $subcolor2;
height: 410px;
.inner_wrap{
.main_tit {
margin-top: 30px;
text-align: center;
font-size: 24px;
span {
font-size: 32px;
font-weight: bold;
}
}
ul {
display: flex;
justify-content: center;
li {
width: 500px;
height: 100px;
padding: 15px;
background: #fff;
margin: $dpadding*2;
padding-top: 25px;
border: 1px solid #ccc;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
border-top-left-radius: 25px ;
border-bottom-left-radius: 25px;
border-top-right-radius: 25px;
}
li:nth-child(2) {
margin-top: $dpadding*10;
}
li:nth-child(4) {
margin-top: $dpadding*10;
}
}
}
.link_div {
ul {
display: flex;
width: 1000px;
height: 100px;
padding: 15px;
border-radius: 25px;
background: #fff;
text-align: center;
margin: 90px auto;
justify-content: space-between;
border: 1px solid #ccc;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
li {
margin: $dpadding*2;
width: 20%;
&:nth-child(1) {
span {
background: #6175ba;
border-radius: 50%;
color: #fff;
padding: 10px;
}
p {
margin-top: 10px;
}
}
&:nth-child(2) {
span {
background: #439f88;
border-radius: 50%;
color: #fff;
padding: 10px;
}
p {
margin-top: 10px;
}
}
&:nth-child(3) {
span {
background: #8a6eb8;
border-radius: 50%;
color: #fff;
padding: 10px;
}
p {
margin-top: 10px;
}
}
&:nth-child(4) {
span {
background: #6f9c47;
border-radius: 50%;
color: #fff;
padding: 10px;
}
p {
margin-top: 10px;
}
}
&:nth-child(5) {
span {
background: #508ed9;
border-radius: 50%;
color: #fff;
padding: 10px;
}
p {
margin-top: 10px;
}
}
}
}
}
}
#life {
h2 {
margin-top: 60px;
margin-bottom: 40px;
text-align: center;
padding: $dpadding 0;
span {
font-size: 32px;
}
}
ul{
padding: $dpadding 0;
display: flex;
width: 100%;
li {
float: left;
width: 22%;
img{
width: 100%;
border-radius: 25px;
}
border: 1px solid #ccc;
border-radius: 25px;
text-align: center;
p {
padding: 40px;
}
}
li:not(:last-child) {
margin-right: 4%;
}
}
}
#main_banner {
background: $subcolor;
ul{
display: flex;
justify-content: center;
li {
display: flex;
align-items: center;
padding: 40px;
div {
padding-right: 60px;
}
}
}
}
#main_community {
div:first-child {
width: 50%;
float: left;
padding-top: 40px;
ul {
padding-top: 20px;
li {
background: #eee;
padding: $dpadding*1.5;
margin: 7px 0;
border-radius: 8px;
strong {
color: $maincolor;
}
span {
font-size: 14px;
}
}
padding-right: $dpadding*4;
}
}
div:last-child {
display: flex;
flex-direction: column;
h2 {
padding: 20px 0;
}
.event {
width: 100%;
div {
height: 200px;
background: $subcolor2;
padding-top: 50px;
background-image: url('../images/banner01.png');
background-size:contain;
background-repeat: no-repeat;
background-position: right;
padding-left: 50px;
border-radius: 25px;
h3 {
font-size: 28px;
}
p {
padding-top: 20px;
font-size: 14px;
}
}
}
.notice {
ul {
font-size: 14px;
li {
span {
padding-right: 40px;
}
}
}
}
}
}
#recommand {
padding-top:80px;
ul{
padding-top: 20px;
display: flex;
li{
width: 25%;
padding: $dpadding;
background: #508ed9;
color: #fff;
height: 150px;
border-radius: 25px;
padding: 20px;
p {
padding: 10px 0;
}
strong {
font-size: 24px;
}
}
li:not(:last-child)
{
margin-right: 30px;
}
}
}
#footer {
display: flex;
flex-direction: column;
#footer_menu {
width: 100%;
height: 70px;
background-color: #eee;
margin-top: 60px;
ul{
display: flex;
justify-content: center;
li {
padding: 0 50px;
}
}
}
#footer_copy {
float: left;
img {
width: 40%;
}
ul {
float: right;
li {
float: left;
padding: 10px;
}
width: 60%;
}
}
#footer_copy address {
text-align: center;
}
}
style_teacher.scss
$maincolor: #007aff;
$bgcolor1: #dfe6f9;
@mixin flexlayout($dir: row, $wrap: nowrap, $justify: space-between, $align: center) {
display: flex;
flex-direction: $dir;
flex-wrap: $wrap;
justify-content: $justify;
align-items: $align;
}
#header {
border-bottom: 1px solid #ccc;
text-align: center;
div {
@include flexlayout();
height: 80px;
h1 {
background: url('../images/logo.png') center center/100% no-repeat;
width: 180px;
height: 40px;
font-size: 0;
margin-right: 20px;
}
}
.logo_area {
ul {
@include flexlayout();
border: 1px solid #ccc;
li {
line-height: 36px;
padding: 0 6px;
font-size: 13px;
&:nth-child(2) {
background: #ccc;
}
}
}
}
.nav {
> ul {
@include flexlayout();
li {
padding: 0 16px;
}
}
> div {
position: relative;
width: 70px;
height: 20px;
ul {
position: absolute;
top: 0;
left: 0;
width: 60px;
border: 1px solid #ccc;
font-size: 12px;
line-height: 22px;
&:hover {
border-color: $maincolor;
li {
&:nth-child(2) {
display: block;
}
}
}
li {
&:nth-child(2) {
display: none;
}
&:hover {
background: $maincolor;
a { color: #fff; }
}
}
}
}
}
}
.inner_wrap {
width: 100%;
max-width: 1200px;
margin: 0 auto;
}
.main_tit {
padding: 60px 0 20px; // 위-좌우-아래
text-align: center;
font-size: 32px;
span {
font-size: 42px;
font-weight: bold;
}
}
#insurance_story {
background: $bgcolor1;
position: relative;
padding-bottom: 120px;
.text-box {
@include flexlayout($align: flex-start);
height: 180px;
li {
background: #fff;
line-height: 1.6;
width: 22%;
padding: 30px;
border-radius: 40px 40px 0 40px; // 시계방향
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
&:nth-child(even) {
align-self: flex-end;
}
}
}
.link_div {
width: 100%;
max-width: 1200px;
position: absolute;
left: 50%;
bottom: -50px;
transform: translate(-50%, 0);
background: #fff;
height: 100px;
border-radius: 24px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
ul {
text-align: center;
@include flexlayout();
li {
width: 18%;
padding-top: 16px;
span {
display: inline-block; // display 주면 크기 지정 가능
width: 50px;
height: 50px;
border-radius: 50%;
color: #fff;
line-height: 50px;
}
&:nth-child(1) span {
background: #6175ba;
}
&:nth-child(2) span {
background: #439f88;
}
&:nth-child(3) span {
background: #8a6eb8;
}
&:nth-child(4) span {
background: #6f9c47;
}
&:nth-child(5) span {
background: #508ed9;
}
}
}
}
}
'Stack > CSS' 카테고리의 다른 글
[CSS] CSS 애니메이션 (0) | 2022.04.20 |
---|---|
[CSS / SCSS] SCSS로 Style 적용하기 4 (hotel) (0) | 2022.04.20 |
[CSS / SCSS] SCSS로 Style 지정하기 2 (Display) (0) | 2022.04.19 |
[CSS / SCSS] SCSS로 Style 지정하기 (Isaknox) (0) | 2022.04.19 |
[CSS / SCSS] SCSS; CSS Preprocessor / CSS 전처리기 (0) | 2022.04.18 |