2
我有一个ul,li设计css,它在bootstrap上很好用。当我在Angular材质项目上使用相同的角色时,Angular材质css会阻止该CSS代码工作。CSS3 vs Angular Material CSS
CSS代码:
li {
width: 2em;
height: 2em;
text-align: center;
line-height: 2em;
border-radius: 1em;
background: dodgerblue;
margin: 0 1em;
display: inline-block;
color: white;
position: relative;
}
li::before {
content: '';
position: absolute;
top: .9em;
left: -4em;
width: 4em;
height: .2em;
background: dodgerblue;
z-index: -1;
}
li:first-child::before {
display: none;
}
.active {
background: dodgerblue;
}
.active ~ li {
background: lightblue;
}
.active ~ li::before {
background: lightblue;
}
HTML代码:
<link rel="stylesheet" href="app/css/style.css">
<link href="master/libraries/angular-material/angular-material.css" rel="stylesheet" />
在包括材料CSS链接,果然我的设计是行不通的。但是,我需要那些去工作。
尝试把你的CSS角材料CSS – cssGEEK
我试过之后,但无果。对于这一点。我仍然保持不变。做角材料支持css3? –
为什么不会it.remember angular主要是一个JavaScript framwork。它不会影响您的浏览器的任何CSS3特性 – cssGEEK