【发布时间】:2020-10-27 08:48:44
【问题描述】:
这是我的 style.css
.styles_ticker__8iZE9 {
background-color: rgb(56, 55, 63);
width: 100%;
overflow: hidden;
margin-top: -40px;
margin-left: -10px;
padding-bottom: 8px;
border-bottom: 1px solid #26A69A;
}
.styles_tickerItemFinancial__3uuXj:hover {
background-color: rgb(56, 55, 63);
cursor: pointer;
}
.newsticker{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
}
a:hover{
text-decoration: none;
}
.styles_newsticker__2xlP7 {
min-width: 27%;
padding: 0.6rem;
color: #26A69A;
display: flex;
align-items: center;
font-size: 13px;
font-weight: 500;
text-decoration: none;
border-top: 1px solid #26A69A;
}
.styles_newsticker__2xlP7:hover {
background-color: rgb(56, 55, 63);
}
.styles_title__24Ef9:hover , .styles_newsticker__2xlP7:hover {
text-decoration: none;
color: #ffffff;
}
.styles_tickerItem__1yblE:after {
background: #26A69A;
content: "";
position: absolute;
top: 10px;
bottom: 10px;
left: -1px;
width: 2px;
}
.styles_meta__2enVD {
font-size: 12px;
color: #fff;
opacity: 1;
}
这是我的 .js 文件
这是我的 react 组件,我在其中实现了一个不错的 react 代码包。
import Ticker, { FinancialTicker, NewsTicker } from 'nice-react-ticker';
import axios from 'axios'
import './TickerList.style.css'
render() {
return (
<div>
<Ticker style={{paddingBottom :"50px"}}>
{
this.state.tickerData.map(buc => (
<FinancialTicker id={buc.id} change={true} symbol={buc[1]} lastPrice={buc[3]} percentage={buc[2]} />
))
}
</Ticker>
</div>
)
}
}
当我在 AWS 上部署我的代码时,包的预样式会覆盖我的样式 但在本地一切正常(我的更改不会被预样式覆盖) 如何停止预样式以覆盖我的本地样式
【问题讨论】:
标签: css reactjs react-native sass react-redux