2026, 새로운 도약을 시작합니다.

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

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개

css만으로 되어있는게 마음에 드네요.
좋은 자료 감사합니다
잘쓰셔요~ 감사합니다~
감사합니다!!..
감사합니다 ^^
감사합니다. 잘 사용하겠습니다.
감사합니다 잘쓰셔요~
감사합니다. 잘활용하겠습니다.
공유,감사합니다...
잘 쓰겠습니다.
좋은 정보 감사합니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

그누보드5 팁자료실

번호 제목 글쓴이 날짜 조회
공지 3년 전 조회 4,597
2741 3일 전 조회 99
2740 4일 전 조회 96
2739 1주 전 조회 206
2738 1주 전 조회 209
2737 1주 전 조회 174
2736 1주 전 조회 276
2735 3주 전 조회 278
2734 3주 전 조회 259
2733 1개월 전 조회 262
2732 1개월 전 조회 300
2731 1개월 전 조회 264
2730 1개월 전 조회 222
2729 1개월 전 조회 350
2728 1개월 전 조회 244
2727 1개월 전 조회 419
2726 1개월 전 조회 253
2725 1개월 전 조회 326
2724 1개월 전 조회 357
2723 1개월 전 조회 265
2722 1개월 전 조회 298
2721 1개월 전 조회 211
2720 2개월 전 조회 304
2719 2개월 전 조회 307
2718 2개월 전 조회 200
2717 2개월 전 조회 335
2716 2개월 전 조회 202
2715 2개월 전 조회 311
2714 2개월 전 조회 271
2713 2개월 전 조회 374
2712 2개월 전 조회 289
🐛 버그신고