Css 如何设置扩展侧边栏的样式?
我的扩展中有下面的侧边栏,但我想改变外观和感觉。我该怎么做Css 如何设置扩展侧边栏的样式?,css,cross-browser,styles,sidebar,crossrider,Css,Cross Browser,Styles,Sidebar,Crossrider,我的扩展中有下面的侧边栏,但我想改变外观和感觉。我该怎么做 var sidebar = new appAPI.sidebar({ position: 'right', url: 'http://news.yahoo.com', html: 'Some Html', title: { content: 'Yahoo News', close: true }, opacity: 1.0, width: '300px', height: '100%',
var sidebar = new appAPI.sidebar({
position: 'right',
url: 'http://news.yahoo.com',
html: 'Some Html',
title: {
content: 'Yahoo News',
close: true
},
opacity: 1.0,
width: '300px',
height: '100%',
preloader: true,
sticky: true,
slide: 150,
openAction: ['click', 'dblclick'],
closeAction: 'click',
theme: 'default',
scrollbars: false,
openOnInstall: true
有几种方法可以实现这一点,但我更喜欢的方法是使用适当的选择器将相关的CSS规则注入页面。例如,要将边框颜色更改为红色:
var inlineCss = '.crossrider-sidebar-'+appAPI.appInfo.id+'-container {' +
'border-color:red !important;' +
'}';
appAPI.dom.addInlineCSS({css:inlineCss});
[披露:我是一名Crossrider员工]如果您提供更多有关所需“外观”的详细信息,请与我们联系,这将对我们有所帮助。检查侧边栏的DOM,查看css类并覆盖所需的值