采取"内联CSS"并添加到" CSS文件"通过Joomla - 怎么样?

时间:2014-03-13 12:18:58

标签: joomla joomla-extensions

我正在使用Joomla的“JJ Social Slider”来添加社交媒体按钮。我的问题是该插件自动将一大块内联CSS(见下文)添加到我的html页面中,我找不到如何防止它或至少将其放入外部CSS文件的方法。我想保留所有CSS外部。

请帮忙!

内联CSS:

<style type="text/css">ul#jj_sl_navigation li a {background-color:#00c70a;text-align:left;color:#ffffff !important}ul#jj_sl_navigation .custom1 a:hover{background-color:#000000}ul#jj_sl_navigation .custom2 a:hover{background-color:#000000}ul#jj_sl_navigation .custom3 a:hover{background-color:#000000}ul#jj_sl_navigation .custom4 a:hover{background-color:#000000}ul#jj_sl_navigation .custom5 a:hover{background-color:#000000}ul#jj_sl_navigation {left:0;top:300px}ul#jj_sl_navigation li:hover {margin-left:0}ul#jj_sl_navigation li a {padding:11px 0 11px 10px;margin-left:-2px}ul#jj_sl_navigation .facebook a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/facebook-black.png)}ul#jj_sl_navigation .twitter a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/twitter-black.png)}ul#jj_sl_navigation .google a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/google-black.png)}ul#jj_sl_navigation .myspace a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/myspace-black.png)}ul#jj_sl_navigation .youtube a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/youtube-black.png)}ul#jj_sl_navigation .linkedin a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/linkedin-black.png)}ul#jj_sl_navigation .steam a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/steam-black.png)}ul#jj_sl_navigation .lastfm a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/lastfm-black.png)}ul#jj_sl_navigation .pinterest a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/pinterest-black.png)}ul#jj_sl_navigation .soundcloud a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/soundcloud-black.png)}ul#jj_sl_navigation .tumblr a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/tumblr-black.png)}ul#jj_sl_navigation .github a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/github-black.png)}ul#jj_sl_navigation .flickr a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/flickr-black.png)}ul#jj_sl_navigation .rss a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/rss-black.png)}ul#jj_sl_navigation .vimeo a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/vimeo-black.png)}ul#jj_sl_navigation .custom1 a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/icon.png)}ul#jj_sl_navigation .custom2 a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/icon.png)}ul#jj_sl_navigation .custom3 a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/icon.png)}ul#jj_sl_navigation .custom4 a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/icon.png)}ul#jj_sl_navigation .custom5 a {background-position:144px 50%;background-image:url(http://localhost/media/mod_social_slider/icons/icon.png)}h1,h2,h3,h4,h5,h6,.site-title{font-family:'Open Sans',sans-serif}body.site {border-top:3px solid #e0d319;background-color:#002ee6 }a {color:#e0d319}.navbar-inner,.nav-list >.active >a,.nav-list >.active >a:hover,.dropdown-menu li >a:hover,.dropdown-menu .active >a,.dropdown-menu .active >a:hover,.nav-pills >.active >a,.nav-pills >.active >a:hover,.btn-primary {background:#e0d319}.navbar-inner {-moz-box-shadow:0 1px 3px rgba(0,0,0,.25),inset 0 -1px 0 rgba(0,0,0,.1),inset 0 30px 10px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.25),inset 0 -1px 0 rgba(0,0,0,.1),inset 0 30px 10px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.25),inset 0 -1px 0 rgba(0,0,0,.1),inset 0 30px 10px rgba(0,0,0,.2)}</style>

1 个答案:

答案 0 :(得分:2)

我实际上是JJ Social Slider的开发者。我们这样做的原因是因为CSS的这一部分需要基于参数值的值,并且不能在CSS文件中调用php变量。

有些方法可以将它作为单独的文件应用,但是我们使用了样式声明来实现更清晰的编码流程