14. Liquid Button

Effect (the source code network disk address is at the end)

Pay attention to the public account "Moving the World" to see more video tutorials!

source code

index.html

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>液体按钮</title>
  <link rel="stylesheet" href="./style.css">

</head>
<body>
<a href="#">
  <span>Button</span>
  <div class="liquid"></div>
</a>
  
</body>
</html>

css

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0c0c0c;
}

a {
  position: relative;
  padding: 20

Guess you like

Origin blog.csdn.net/qq449245884/article/details/122748352