如何使用css名称空间来避免css冲突?

如何使用css名称空间来避免css冲突?,css,namespaces,Css,Namespaces,pnotify.css: .ui-pnotify-container { background-position: 0 0; padding: .8em; left: 0; width: 290px; background-color: #fcf8e3; margin: 0; position: relative ; color: #c09853; } .alert { width: 366px; padding: 13px 10px; margin-left: -183px; margin-

pnotify.css:

.ui-pnotify-container {
background-position: 0 0;
padding: .8em;
left: 0;
width: 290px;
background-color: #fcf8e3;
margin: 0;
position: relative ;
color: #c09853;
}
.alert {
width: 366px;
padding: 13px 10px;
margin-left: -183px;
margin-top: -200px;
border: 1px solid #999;
position: absolute;
top: 50%;
left: 50%;
z-index: 1060;
background-color: #e2e7eb;
color: #666666;
text-align: center;
} 
在中被此部分覆盖

app.css:

.ui-pnotify-container {
background-position: 0 0;
padding: .8em;
left: 0;
width: 290px;
background-color: #fcf8e3;
margin: 0;
position: relative ;
color: #c09853;
}
.alert {
width: 366px;
padding: 13px 10px;
margin-left: -183px;
margin-top: -200px;
border: 1px solid #999;
position: absolute;
top: 50%;
left: 50%;
z-index: 1060;
background-color: #e2e7eb;
color: #666666;
text-align: center;
} 

但作为临时修复,我使用了“!important”。随着项目变得越来越大,这将不是一个好的选择。css名称空间有帮助吗?我不清楚怎么做。

你能在这里分享你的html头标签吗?你是说这个吗?在这里,您要执行哪个
.ui pnotify container
或此
.alert
pnotify container的样式不应被应用程序的警报覆盖