Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- IT
- CSS
- 웹디자인
- 통계사이트
- 포토샵기초
- 아이드로퍼툴
- html
- 포토샵
- 아이콘가이드
- flexbox froggy
- 스마트오브젝트
- 일러스트3d
- 인포그래픽
- 일러스트 블렌드
- 자바스크립트
- 일러스트기초
- 일러스트아이소메트릭
- 일러스트 기초
- 웹디자인 기초
- 자바스크립트 변수
- css diner
- 자바스크립트매개변수
- html기초
- 자바스크립트기초
- 디스톨트
- 사진보정
- flexbox defense
- 레이어그룹
- 자바스크립트함수
- 일러스트 브러쉬
Archives
- Today
- Total
오늘보다 더 나은 내일
[수업노트](20.11.10)D+23 상품이미지 view박스 및 hover효과/ text-transform:uppercase 본문
국비지원 UX UI 디자인/코딩 수업
[수업노트](20.11.10)D+23 상품이미지 view박스 및 hover효과/ text-transform:uppercase
papiliofly 2020. 11. 14. 01:42728x90
※ 상품이미지 hover효과 주기
- .img-box에 position:absolute;를 준다
- transition 이용하여
opacity,transform,background-color 애니메이션 지정
- text-transform:uppercase;는 대문자 변환 속성
<div class="box-1">
<div class="img-box">
<img src="http://bnx.oa.gg/img/bnx_16fw_visual_01_list.jpg" alt="">
</div>
<div class="prod-name">단가라 OPS</div>
<div class="prod-price">19,800</div>
</div>
body {
margin:0;
}
.img-box > img {
width:100%;
display:block;
}
.box-1 {
margin-top:100px;
width:300px;
margin:0 auto;
}
.box-1 {
cursor:pointer;
}
.box-1 > *:not(:first-child) {
text-align:center;
font-weight:bold;
margin-top:10px;
}
.box-1 > .prod-name {
font-size:1.4rem;
}
.box-1 > .prod-price {
font-size:1.4rem;
}
.box-1 > .prod-price::after {
content:"원";
font-size:1rem;
}
.box-1 > .img-box {
position:relative;
overflow:hidden;
}
.box-1 > .img-box::after {
content:"";
display:block;
background-color:rgba(0,0,0,0);
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
transition:background-color 0.5s;
}
.box-1 > .img-box::before {
content:"view";
text-transform:uppercase;
font-weight:bold;
position:absolute;
top:50%;
left:50%;
color:white;
transform:translateX(-50%) translateY(-50%);
font-size:1.2rem;
border:5px solid white;
padding:10px;
border-radius:10px;
z-index:1;
opacity:0;
transition:opacity 0.5s;
}
.box-1:hover > .img-box::after {
background-color:rgba(0,0,0,.5);
}
.box-1:hover > .img-box::before {
opacity:1;
}
.box-1 > .img-box > img {
transition:transform 0.5s;
/*
position:relative;
z-index:-1;
*/
}
.box-1:hover > .img-box > img {
transform:scale(1.2);
}
728x90
'국비지원 UX UI 디자인 > 코딩 수업' 카테고리의 다른 글
[수업노트](20.11.12)D+25 flex 반응형 메뉴바 만들기 (0) | 2020.11.14 |
---|---|
[수업노트](20.11.11)D+24 flex froggy/ flex정리 (0) | 2020.11.14 |
[수업노트](20.11.09)D+22 PC상단바 만들기 (0) | 2020.11.14 |
[수업노트](20.11.05~06)D+20,21 상품리스트 페이지 만들기/box-sizing/음수마진 (0) | 2020.11.11 |
[수업노트](20.11.04)D+19 반응형 레이아웃 (0) | 2020.11.05 |