컴

css 이미지 갤러리

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

이미지 갤러리

다음 이미지 갤러리는 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-08-07 조회 2,675
CSS 17-08-07 조회 2,620
CSS 17-08-06 조회 2,045
CSS 17-08-06 조회 1,920
CSS 17-08-06 조회 2,219
CSS 17-08-03 조회 2,247
CSS 17-08-03 조회 2,976
CSS 17-08-03 조회 2,431
HTML 17-08-02 조회 2,876
HTML 17-08-02 조회 3,309
HTML 17-08-02 조회 3,693
HTML 17-08-01 조회 4,121
HTML 17-08-01 조회 2,587
HTML 17-08-01 조회 2,764
HTML 17-07-28 조회 2,761
HTML 17-07-28 조회 2,348
HTML 17-07-28 조회 2,629
기타 17-07-26 조회 2,522
기타 17-07-26 조회 2,755
기타 17-07-26 조회 3,640
반응형 17-07-25 조회 3,168
반응형 17-07-25 조회 2,348
반응형 17-07-25 조회 2,314
반응형 17-07-24 조회 2,629
반응형 17-07-24 조회 2,790
반응형 17-07-24 조회 2,873
CSS 17-07-20 조회 3,008
CSS 17-07-20 조회 3,090
CSS 17-07-20 조회 3,040
CSS 17-07-18 조회 2,735