뉴비코더
나는 코딩뉴비
뉴비코더
전체 방문자
오늘
어제
  • 분류 전체보기 (91)
    • 개발입문뉴비 - 국비지원 ( Front End ) (91)
      • html (26)
      • css (58)
      • javascript (6)
      • Library React.js (0)
    • FrontEnd ( Self-study ) (0)
      • html5, CSS3 (0)
      • Vanilla JS (0)
      • Clone Code (0)
    • BackEnd ( self-study ) (0)
      • Library Node.js (0)
      • Python (0)
      • Go (0)

블로그 메뉴

  • 홈
  • 방명록

공지사항

인기 글

태그

  • css3
  • js event
  • 프론트엔드
  • 마크업
  • position
  • parseInt
  • HTML
  • js 이벤트객체
  • boxmodeling
  • 웹개발
  • Javascript 배열
  • 하이퍼링크
  • Margin
  • js event object
  • ol
  • UL
  • 가상클래스
  • 국비지원
  • js 생성 함수
  • transform
  • psuedo-class
  • 클론코딩
  • JavaScript
  • 웹개발입문
  • 코딩진화
  • HTML5
  • Transition
  • webfont
  • padding
  • boxmodel

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
뉴비코더

나는 코딩뉴비

[2021/12/30]국비지원 CSS3 10-(3) 과제1 : 갤러리
개발입문뉴비 - 국비지원 ( Front End )/css

[2021/12/30]국비지원 CSS3 10-(3) 과제1 : 갤러리

2022. 2. 1. 07:03

 

갤러리

주제 : perspective 

활용 : :hover, opacity, position, z-index

 


 

원본

 


 

작업내용

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>갤러리</title>
    <style type="text/css">
        ul,li{list-style: none;margin:0;padding:0;}
        div.gallery{margin: 0 auto;width:460px;height:300px; border:10px solid #1e0d17;
                    background-color: #28222a;box-shadow: 5px 5px 15px #000;
                    perspective:600px;}
        li{float:left; margin: 20px 10px 15px 20px; display:block;}
        li>img.small{width:120px;height:90px;position:relative;z-index:1;}
        li>img.pic{width:0px;height:0px;opacity:0.1;border:2px solid #553400;
                   box-shadow: 0px 2px 5px #000;position:absolute;z-index: 2;
                   transition: all 2s ease 0s;}
        li:hover>img.pic{width:320px;height:240px;opacity:1;transform-origin: left top;}
    </style>
</head>
<body>
    <div class="gallery">
        <ul>
            <li>
                <img src="갤러리/images/ph1_s.jpg" class="small" alt="작은그림">
                <img src="갤러리/images/ph1.jpg" class="pic" alt="큰그림">
            </li>
            <li>
                <img src="갤러리/images/ph2_s.jpg" class="small" alt="작은그림">
                <img src="갤러리/images/ph2.jpg" class="pic" alt="큰그림">
            </li>
            <li>
                <img src="갤러리/images/ph3_s.jpg" class="small" alt="작은그림">
                <img src="갤러리/images/ph3.jpg" class="pic" alt="큰그림">
            </li>
            <li>
                <img src="갤러리/images/ph4_s.jpg" class="small" alt="작은그림">
                <img src="갤러리/images/ph4.jpg" class="pic" alt="큰그림">
            </li>
            <li>
                <img src="갤러리/images/ph5_s.jpg" class="small" alt="작은그림">
                <img src="갤러리/images/ph5.jpg" class="pic" alt="큰그림">
            </li>
            <li>
                <img src="갤러리/images/ph6_s.jpg" class="small" alt="작은그림">
                <img src="갤러리/images/ph6.jpg" class="pic" alt="큰그림">
            </li>
        </ul>
    </div>
</body>
</html>

 

 


결과물

 

저작자표시 비영리 변경금지
    '개발입문뉴비 - 국비지원 ( Front End )/css' 카테고리의 다른 글
    • [2021/12/30]국비지원 CSS3 10-(5) psuedo-class :target
    • [2021/12/30]국비지원 CSS3 10-(4) navigation
    • [2021/12/30]국비지원 CSS3 10-(2) transition, transition3d
    • [2021/12/30]국비지원 CSS3 10-(1) 29일 과제
    뉴비코더
    뉴비코더
    FrontEnd 지망 - 코딩뉴비를 위한(?), 뉴비에 의한, 뉴비의 블로그 - 코딩뉴비의 코딩 학습 기록 - 첨가물 : 약간의 불평/사족

    티스토리툴바