😍Thật không thể tin được sử dụng filter: brightness(0) invert(1); để chuyển màu ảnh 🤣

https://benhvientri.com/

Example 1

img {
  filter: brightness(0) invert(1);
}

Tool Hex Color To CSS Filter Converter

https://isotropic.co/tool/hex-color-to-css-filter/

Example 2: HOW TO ANIMATE AN IMAGE USING - HTML & CSS

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="1.css">
</head>
<body>
  <div class="img-box">
    <img src="contact.png" alt="contact.png">
  </div>
</body>
</html>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  display: flex;
  justify-content: center;
  align-content: center;
  width: 100%;
  min-height: 100vh;
  background: #111;
  animation: animate 1s linear infinite;
}
@keyframes animate {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}
.img-box {
  width: 500px;
  height: 450px;
}
.img-box img {
  width: 100%;
  height: 100%;
}

Last updated

Was this helpful?