<div class="element">
rgb() function for sRGB
</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: rgb(20% 50% 90%); /* 用百分比的话是0% ~ 100% */
border: 2vh solid rgb(90% 30% 70% / 65%); /* 增加了透明通道,相当于rgba() */
box-shadow: 0px 0px 5px 6px rgb(0 220 255); /* 用数字表示的话是0~255 */
background-color: rgb(90 90 125 / .85); /* 增加了透明通道,相当于rgba() */
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.