컴

css 이미지 갤러리

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

이미지 갤러리

다음 이미지 갤러리는 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,451
CSS 17-07-18 조회 2,525
CSS 17-06-13 조회 3,998
CSS 17-06-13 조회 3,352
CSS 17-06-13 조회 2,588
CSS 17-06-08 조회 2,079
CSS 17-06-08 조회 2,509
CSS 17-06-08 조회 1,996
CSS 17-06-06 조회 5,706
CSS 17-06-05 조회 3,657
CSS 17-06-05 조회 3,464
CSS 17-06-05 조회 2,542
HTML 17-06-02 조회 3,516
HTML 17-05-26 조회 3,953
CSS 17-05-05 조회 2,845
CSS 17-05-05 조회 2,332
CSS 17-05-05 조회 2,102
CSS 17-05-04 조회 3,091
CSS 17-05-04 조회 2,988
CSS 17-05-04 조회 3,490
CSS 17-04-10 조회 2,182
CSS 17-04-10 조회 1,867
CSS 17-04-10 조회 2,633
CSS 17-04-05 조회 2,283
CSS 17-04-05 조회 2,559
CSS 17-04-05 조회 2,556
CSS 17-04-04 조회 2,440
CSS 17-04-04 조회 2,608
CSS 17-04-04 조회 2,706
CSS 17-03-13 조회 3,276