1. 1.input 密码框 背景颜色修改不生效
解决办法:
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
-webkit-text-fill-color: var(--color) !important;
-webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
background-color: transparent;
background-image: none;
transition: background-color 50000s ease-in-out 0s;
}
input {
background-color: transparent;
}
2. flex-basis
flex-basis的优先级大于width
3. (非常基础但是不知道)选择器后面只允许跟一个伪元素修改样式才生效,多个不生效。
4. svg 作为css 背景不拉伸铺平整个屏幕需要设置参数如下:
background: url("img.jpg") no-repeat; background-size:100% 100%;
同时需将 preserveAspectRatio=“none” 属性值加到定义的svg声明中。
<svg id="BG" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="1920" height="1080" viewBox="0 0 1920 1080"
preserveAspectRatio="none"
></svg>