<div class="element">
  hsl() function in CSS
</div>
/* @use postcss-preset-env; */
/* @use postcss-color-function; */

@import url("https://fonts.googleapis.com/css?family=Gochi+Hand");

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

body {
  margin: 0;
  padding: 0;
  background-color: #291642;
  font-family: "Gochi Hand", sans-serif;
  color: #fff;
  font-size: 130%;
  letter-spacing: 0.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100vw;
  min-height: 100vh;
  padding: 10px;
}

.element {
  width: 50vw;
  min-height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4vh;
  font-size: 2rem;
  
  color: hsl(250deg 10% 30%);
  border: 2vh solid hsl(60deg, 40%, 20%);
  box-shadow: 0px 0px 5px 6px hsl(230deg 40% 80% / 50%); /* 增加了透明通道,相当于hsla() */
  background-color: hsl(190deg, 50%, 90%, .8); /* 增加了透明通道,相当于hsla() */
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.