Unity文档-USS 选择器
/*C# type选择器:按钮元素*/
Button {border-radius: 33px;width: 100px;
}/*Pseudo-Class(伪类) ":hover"*/
Button:hover {border-radius: 11px;width: 100px;
}/*根伪类*/
:root {height: 300px;
}/*name选择器:名为"Cancel"的元素*/
#Cancel {width: 190px;border-width: 2px;border-color: DarkRed;background-color: LightGreen;
}/*class选择器:添加了此class的元素*/
.ClassName{background-color: yellow;height: 55px;
}/*通用选择器*/
*{background-color: lightblue;
}/*Descendant(后代)选择器(中间有个空格!):第一个选择器的结果,第二个选择器匹配其所有后代元素*/
#descendant1 .descendant2 {background-color: yellow;
}/*Child选择器:第一个选择器的结果,第二个选择器只匹配其直接子节点元素*/
#child1 > .child2 {background-color: yellow;
}/*Multiple选择器:选择满足所有选择器的元素*/
.multiple1.multiple2 {background-color: yellow;
}
Unity文档-BEM编写规范
BEM命名规则, <块名称> _ _ <元素名称> - - <修饰符>(注意横线数量):
本文发布于:2024-01-28 16:43:48,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17064314348821.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |