css 이미지 갤러리

이미지 갤러리

다음 이미지 갤러리는 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
 

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

퍼블리셔팁

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

+
분류 제목 글쓴이 날짜 조회
기타 8년 전 조회 2,390
기타 8년 전 조회 3,271
반응형 8년 전 조회 2,804
반응형 8년 전 조회 2,003
반응형 8년 전 조회 1,976
반응형 8년 전 조회 2,278
반응형 8년 전 조회 2,449
반응형 8년 전 조회 2,550
CSS 8년 전 조회 2,689
CSS 8년 전 조회 2,746
CSS 8년 전 조회 2,714
CSS 8년 전 조회 2,403
CSS 8년 전 조회 2,076
CSS 8년 전 조회 2,180
CSS 8년 전 조회 3,671
CSS 8년 전 조회 2,978
CSS 8년 전 조회 2,222
CSS 8년 전 조회 1,720
CSS 8년 전 조회 2,163
CSS 8년 전 조회 1,651
CSS 8년 전 조회 5,320
CSS 8년 전 조회 3,294
CSS 8년 전 조회 3,095
CSS 8년 전 조회 2,179
HTML 8년 전 조회 3,109
HTML 8년 전 조회 3,576
CSS 8년 전 조회 2,486
CSS 8년 전 조회 1,974
CSS 8년 전 조회 1,742
CSS 8년 전 조회 2,736
🐛 버그신고