컴

css 이미지 갤러리

· 2017-06-13 (화) 00:13:01 · 4021

이미지 갤러리

다음 이미지 갤러리는 CSS로 생성됩니다.

 

예

<html>

<head>

<style>

div.gallery {

    margin: 5px;

    border: 1px solid #ccc;

    float: left;

    width: 180px;

}

 

div.gallery:hover {

    border: 1px solid #777;

}

 

div.gallery img {

    width: 100%;

    height: auto;

}

 

div.desc {

    padding: 15px;

    text-align: center;

}

</style>

</head>

<body>

 

<div class="gallery">

  <a target="_blank" href="fjords.jpg">

    <img src="fjords.jpg" alt="Fjords" width="300" height="200">

  </a>

  <div class="desc">Add a description of the image here</div>

</div>

 

<div class="gallery">

  <a target="_blank" href="forest.jpg">

    <img src="forest.jpg" alt="Forest" width="300" height="200">

  </a>

  <div class="desc">Add a description of the image here</div>

</div>

 

<div class="gallery">

  <a target="_blank" href="lights.jpg">

    <img src="lights.jpg" alt="Northern Lights" width="300" height="200">

  </a>

  <div class="desc">Add a description of the image here</div>

</div>

 

<div class="gallery">

  <a target="_blank" href="mountains.jpg">

    <img src="mountains.jpg" alt="Mountains" width="300" height="200">

  </a>

  <div class="desc">Add a description of the image here</div>

</div>

 

</body>

</html>

 

c4020c4a3ebfd47467ebcf5a9053df60_1497280378_6584.gif
 

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

퍼블리셔팁

1,282건

퍼블리싱과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
CSS 17-07-18 조회 2,482
CSS 17-07-18 조회 2,548
CSS 17-06-13 조회 4,022
CSS 17-06-13 조회 3,380
CSS 17-06-13 조회 2,611
CSS 17-06-08 조회 2,103
CSS 17-06-08 조회 2,532
CSS 17-06-08 조회 2,023
CSS 17-06-06 조회 5,740
CSS 17-06-05 조회 3,685
CSS 17-06-05 조회 3,488
CSS 17-06-05 조회 2,561
HTML 17-06-02 조회 3,545
HTML 17-05-26 조회 3,980
CSS 17-05-05 조회 2,874
CSS 17-05-05 조회 2,362
CSS 17-05-05 조회 2,133
CSS 17-05-04 조회 3,116
CSS 17-05-04 조회 3,010
CSS 17-05-04 조회 3,518
CSS 17-04-10 조회 2,208
CSS 17-04-10 조회 1,895
CSS 17-04-10 조회 2,656
CSS 17-04-05 조회 2,310
CSS 17-04-05 조회 2,589
CSS 17-04-05 조회 2,580
CSS 17-04-04 조회 2,462
CSS 17-04-04 조회 2,630
CSS 17-04-04 조회 2,730
CSS 17-03-13 조회 3,299