펄스나인

흔하게 볼 수 있는 부드러운~ 이미지롤오버

· 2019-06-28 (금) 16:54:44 · 7312 · 20
2019-06-28 16;48;32.PNG

그누 팁은 아니지만

갤러리게시판 등 작업할때 응용할 수 있을것 같아서 올려봅니다.

요즘 흔하게 볼 수 있는 롤오버 이펙트 입니다.

CSS만으로 되어있어서 사용하기 좋네요.

 

미리보기 Url 있습니다~

 

 

style

 

[code]
body {
background-color:#eee
}
.wrap {
  margin:50px auto 0 auto;
  width:100%;
  display:flex;
  align-items:space-around;
  max-width:1200px;
}
.tile {
  width:380px;
  height:380px;
  margin:10px;
  background-color:#99aeff;
  display:inline-block;
  background-size:cover;
  position:relative;
  cursor:pointer;
  transition: all 0.4s ease-out;
  box-shadow: 0px 35px 77px -17px rgba(0,0,0,0.44);
  overflow:hidden;
  color:white;
  font-family:'Roboto';
}
.tile img {
  height:100%;
  width:100%;
  position:absolute;
  top:0;
  left:0;
  z-index:0;
  transition: all 0.4s ease-out;
}
.tile .text {
  position:absolute;
  padding:30px;
  height:calc(100% - 60px);
  height:calc(100% - 60px);
}
.tile h1 {
  font-weight:300;
  margin:0;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}
.tile h2 {
  font-weight:100;
  margin:20px 0 0 0;
  font-style:italic;
   transform: translateX(200px);
}
.tile p {
  font-weight:300;
  margin:20px 0 0 0;
  line-height: 25px;
  transform: translateX(-200px);
  transition-delay: 0.2s;
}
.animate-text {
  opacity:0;
  transition: all 0.6s ease-in-out;
}
.tile:hover {
  box-shadow: 0px 35px 77px -17px rgba(0,0,0,0.64);
  transform:scale(1.05);
}
.tile:hover img {
  opacity: 0.2;
}
.tile:hover .animate-text {
  transform:translateX(0);
  opacity:1;
}
.dots {
  position:absolute;
  bottom:20px;
  right:30px;
  margin: 0 auto;
  width:30px;
  height:30px;
  color:currentColor;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-around;
}
.dots span {
    width: 5px;
    height:5px;
    background-color: currentColor;
    border-radius: 50%;
    display:block;
  opacity:0;
  transition: transform 0.4s ease-out, opacity 0.5s ease;
  transform: translateY(30px);
}

.tile:hover span {
  opacity:1;
  transform:translateY(0px);
}

.dots span:nth-child(1) {
   transition-delay: 0.05s;
}
.dots span:nth-child(2) {
   transition-delay: 0.1s;
}
.dots span:nth-child(3) {
   transition-delay: 0.15s;
}

@media (max-width: 1200px) {
  .wrap {
   flex-direction: column;
    width:400px;
  }
}

[/code]

 

 

body

 

[code]

<div class="wrap">
    <div class="tile"> 
        <img src='images/s_01.jpg'/>
        <div class="text">
            <h1>Title</h1>
            <h2 class="animate-text">content1</h2>
            <p class="animate-text">content2</p>
            <div class="dots">
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>
    </div>


    <div class="tile"> 
        <img src='images/s_02.jpg'/>
        <div class="text">
            <h1>Title</h1>
            <h2 class="animate-text">content1</h2>
            <p class="animate-text">content2</p>
            <div class="dots">
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>
    </div>
  
    <div class="tile"> 
        <img src='images/s_03.jpg'/>
        <div class="text">
            <h1>Title</h1>
            <h2 class="animate-text">content1</h2>
            <p class="animate-text">content2</p>
            <div class="dots">
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>
    </div>

</div>

[/code]

 

 

야무집니다~ 찰지네요!

멋진 갤러리가 나오길 기대해봅니다.
안나오면 직접만들?!

첨부파일

2019-06-28 16;48;32.PNG (1.1 MB)
21회 2019-06-28 16:54
|

댓글 20개

2019-07-01 (월) 11:19:21
좋아요
저두요!
2019-07-01 (월) 15:39:03
css만으로 되어있는게 마음에 드네요.
좋은 자료 감사합니다
잘쓰셔요~ 감사합니다~
2019-07-02 (화) 01:04:50
감사합니다!!..
감사합니다 ^^
감사합니다. 잘 사용하겠습니다.
감사합니다 잘쓰셔요~
감사합니다. 잘활용하겠습니다.
잘쓰세요 ^^
2019-09-18 (수) 12:31:20
공유,감사합니다...
감사합니다~
CSS
!!
2019-10-24 (목) 16:12:08
잘 쓰겠습니다.
잘쓰셔요~
2020-07-24 (금) 09:39:24
gg
^^
좋은 정보 감사합니다.
감사합니다!
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

2,788건
+
제목 글쓴이 날짜 조회
19-07-31 조회 8,458
19-07-29 조회 3.3만
19-07-28 조회 7,770
19-07-25 조회 5,422
19-07-23 조회 5,971
19-07-23 조회 5,317
19-07-23 조회 6,837
19-07-19 조회 6,681
19-07-18 조회 5,649
19-07-17 조회 5,875
19-07-13 조회 8,341
19-07-12 조회 7,223
19-07-12 조회 6,276
19-07-12 조회 5,653
19-07-11 조회 5,511
19-07-10 조회 1.4만
19-07-02 조회 8,553
19-07-01 조회 7,337
19-06-30 조회 7,119
19-06-29 조회 7,300
19-06-28 조회 6,262
19-06-28 조회 7,313
19-06-27 조회 5,409
19-06-27 조회 6,029
19-06-23 조회 6,617
19-06-23 조회 1만
19-06-21 조회 1.4만
19-06-21 조회 6,071
19-06-17 조회 8,191
19-06-15 조회 8,253