input框变色:
.input:focus{
border-color:red;
}
input框所在的div变色:
.div:focus-within{
background:red
}
.div{
transition:0.5s
}
input框的必输项
input框加上required关键字
.label span :has(+input[required])::after{
content:'*';
color:red
}
文字段落的首个字母大写
.content::frist-letter{
font-weight:blod;
font-size:0.5rem;
text-transform:uppercase;
float:left;
line-height:1;
margin-right:10px
}
选中的文本样式
.content:selection{
color:red
}