Responsive Masonry Image Gallery Using Pure HTML & CSS Only-Mr. Web Designer


1- ស្វែងរក​ស្លាក ]]></B:skin> ហើយ​ចម្លង​កូដ​ខាង​ក្រោម​ យក​ទៅ​ដាក់​ខាង​លើ​ស្លាក​នោះ


@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600&display=swap');

*{
  margin:0; padding:0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

.container{
  max-width: 85%;
  margin:20px auto;
}

.container .title{
  font-size: 25px;
  background-color: #000;
  color:#fff;
  border-radius: 5px;
  margin-bottom: 10px;
  text-align: center;
  padding:15px;
}

.container .image-container{
  columns:3 250px;
  gap:15px;
}

.container .image-container img{
  margin-bottom: 10px;
  border-radius: 5px;
  width: 100%;
}



1- សូមចូលទៅកាន់សារបង្ហោះ ជាចុងក្រោយ នឹងបន្ថែមរូបភាពដែលអ្នកបង្ហោះ



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <!-- custom css file link  -->
    <link rel="stylesheet" href="css/style.css">

</head>
<body>
    
<div class="container">

    <h1 class="title">masonry image gallery</h1>

    <div class="image-container">
        <img src="images/img-1.jpg" alt="">
        <img src="images/img-2.jpg" alt="">
        <img src="images/img-3.jpg" alt="">
        <img src="images/img-4.jpg" alt="">
        <img src="images/img-5.jpg" alt="">
        <img src="images/img-6.jpg" alt="">
        <img src="images/img-7.jpg" alt="">
        <img src="images/img-8.jpg" alt="">
        <img src="images/img-9.jpg" alt="">
    </div>

</div>

</body>
</html>


Post a Comment

Previous Post Next Post