컴

css 이미지 갤러리

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

이미지 갤러리

다음 이미지 갤러리는 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,429
CSS 17-07-18 조회 2,501
CSS 17-06-13 조회 3,980
CSS 17-06-13 조회 3,336
CSS 17-06-13 조회 2,570
CSS 17-06-08 조회 2,056
CSS 17-06-08 조회 2,495
CSS 17-06-08 조회 1,986
CSS 17-06-06 조회 5,688
CSS 17-06-05 조회 3,639
CSS 17-06-05 조회 3,450
CSS 17-06-05 조회 2,528
HTML 17-06-02 조회 3,495
HTML 17-05-26 조회 3,935
CSS 17-05-05 조회 2,833
CSS 17-05-05 조회 2,315
CSS 17-05-05 조회 2,087
CSS 17-05-04 조회 3,074
CSS 17-05-04 조회 2,965
CSS 17-05-04 조회 3,469
CSS 17-04-10 조회 2,162
CSS 17-04-10 조회 1,848
CSS 17-04-10 조회 2,614
CSS 17-04-05 조회 2,263
CSS 17-04-05 조회 2,540
CSS 17-04-05 조회 2,536
CSS 17-04-04 조회 2,422
CSS 17-04-04 조회 2,586
CSS 17-04-04 조회 2,681
CSS 17-03-13 조회 3,250