我有一个按钮,是每个组件通用的,所以而不是单独样式的组件,我决定把这些按钮样式在style.css中。全局风格没有得到反映的角度组件
但它剂量工作的所有其他属性,如背景和p标签的作品,但不是这个按钮是因为我用这个按钮的webkit。
我工作时,我把它放在单个组件中。
CSS
input {
outline: none;
float: right;
}
input[type=search] {
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
font-family: inherit;
font-size: 100%;
}
input::-webkit-search-decoration,
input::-webkit-search-cancel-button {
display: none;
}
input[type=search] {
background: #ededed url(https://static.tumblr.com/ftv85bp/MIXmud4tx/search-icon.png) no-repeat 9px center;
border: solid 1px #ccc;
padding: 9px 10px 9px 32px;
width: 55px;
height:15px;
-webkit-border-radius: 10em;
-moz-border-radius: 10em;
border-radius: 10em;
-webkit-transition: all .5s;
-moz-transition: all .5s;
transition: all .5s;
}
input[type=search]:focus {
width: 130px;
background-color: #fff;
border-color: #66CC75;
-webkit-box-shadow: 0 0 5px rgba(109,207,246,.5);
-moz-box-shadow: 0 0 5px rgba(109,207,246,.5);
box-shadow: 0 0 5px rgba(109,207,246,.5);
}
input:-moz-placeholder {
color: #999;
}
input::-webkit-input-placeholder {
color: #999;
}
input {
outline: none;
float: right;
}
input[type=search] {
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
font-family: inherit;
font-size: 100%;
}
input::-webkit-search-decoration,
input::-webkit-search-cancel-button {
display: none;
}
input[type=search] {
background: #ededed url(https://static.tumblr.com/ftv85bp/MIXmud4tx/search-icon.png) no-repeat 9px center;
border: solid 1px #ccc;
padding: 9px 10px 9px 32px;
width: 55px;
height:15px;
-webkit-border-radius: 10em;
-moz-border-radius: 10em;
border-radius: 10em;
-webkit-transition: all .5s;
-moz-transition: all .5s;
transition: all .5s;
}
input[type=search]:focus {
width: 130px;
background-color: #fff;
border-color: #66CC75;
-webkit-box-shadow: 0 0 5px rgba(109,207,246,.5);
-moz-box-shadow: 0 0 5px rgba(109,207,246,.5);
box-shadow: 0 0 5px rgba(109,207,246,.5);
}
input:-moz-placeholder {
color: #999;
}
input::-webkit-input-placeholder {
color: #999;
}
模板
<div class="col l3 offset-l9">
<input type="search" placeholder="Search" #input>
</div>
使用视图封装我试过,但我认为二硝基甲苯使任何diffrence作为对母儿的造型,这些都是蹦床网上单组分
请帮助 -
彼得我知道它的工作,但是当我把它放在全球styles.css的,而不是部分的CSS那么不是 – INFOSYS
组件可能在全球范围内覆盖了你的风格你是否在组件和全局中输入了[type = search],并且它们都有其他样式 –
请确保您的全局链接低于您的网站头部中的组件链接 –