删除内联CSS

时间:2014-09-20 17:40:16

标签: javascript html css

我有这个javascript用于RSS提要,我希望能够根据自己的喜好编辑CSS,但是现有的内联样式表超出了我的偏好。

有关如何删除内联CSS并使用外部样式表的任何想法吗?

这是我的一段javascript ...

<!-- start feedwind code --><script type="text/javascript">document.write('<script type="text/javascript" src="' + ('https:' == document.location.protocol ? 'https://' : 'http://') + 'feed.mikle.com/js/rssmikle.js"><' + '/script>');</script><script type="text/javascript">(function() {var params = {rssmikle_url: "http://youtube.com/user/ReoNaomiMUA",rssmikle_frame_width: "300",rssmikle_frame_height: "400",rssmikle_target: "_blank",rssmikle_font: "Arial, Helvetica, sans-serif",rssmikle_font_size: "12",rssmikle_border: "off",responsive: "off",rssmikle_css_url: "",text_align: "left",text_align2: "left",corner: "off",scrollbar: "on",autoscroll: "off",scrolldirection: "up",scrollstep: "3",mcspeed: "20",sort: "New",rssmikle_title: "off",rssmikle_title_sentence: "",rssmikle_title_link: "",rssmikle_title_bgcolor: "#0066FF",rssmikle_title_color: "#FFFFFF",rssmikle_title_bgimage: "",rssmikle_item_bgcolor: "#FFFFFF",rssmikle_item_bgimage: "",rssmikle_item_title_length: "55",rssmikle_item_title_color: "#FF12D0",rssmikle_item_border_bottom: "off",rssmikle_item_description: "title_only",item_link: "off",rssmikle_item_description_length: "150",rssmikle_item_description_color: "#333333",rssmikle_item_date: "gl1",rssmikle_timezone: "Etc/GMT",datetime_format: "%b %e, %Y %l:%M:%S %p",item_description_style: "text+tn",item_thumbnail: "crop",article_num: "15",rssmikle_item_podcast: "player",keyword_inc: "",keyword_exc: ""};feedwind_show_widget_iframe(params);})();</script>

2 个答案:

答案 0 :(得分:1)

似乎您已使用http://feed.mikle.com/创建RSS Feed窗口小部件。

您可以通过3种方式自定义RSS源。

  1. 使用http://feed.mikle.com本身自定义窗口小部件。
  2. 编写自己的RSS阅读器并应用自己的样式(JavaScript解析器将是最简单的)How to parse an RSS feed using JavaScript?
  3. 编辑给定的JavaScript代码以满足您的需求,因为代码本身包含所有样式信息。见下文。
    &#13;
    &#13;
    (function() {
        var params = {
            rssmikle_url: "http://youtube.com/user/ReoNaomiMUA",
            rssmikle_frame_width: "300",
            rssmikle_frame_height: "400",
            rssmikle_target: "_blank",
            rssmikle_font: "Arial, Helvetica, sans-serif",
            rssmikle_font_size: "12",
            rssmikle_border: "off",
            responsive: "off",
            rssmikle_css_url: "",
            text_align: "left",
            text_align2: "left",
            corner: "off",
            scrollbar: "on",
            autoscroll: "off",
            scrolldirection: "up",
            scrollstep: "3",
            mcspeed: "20",
            sort: "New",
            rssmikle_title: "off",
            rssmikle_title_sentence: "",
            rssmikle_title_link: "",
            rssmikle_title_bgcolor: "#0066FF",
            rssmikle_title_color: "#FFFFFF",
            rssmikle_title_bgimage: "",
            rssmikle_item_bgcolor: "#FFFFFF",
            rssmikle_item_bgimage: "",
            rssmikle_item_title_length: "55",
            rssmikle_item_title_color: "#FF12D0",
            rssmikle_item_border_bottom: "off",
            rssmikle_item_description: "title_only",
            item_link: "off",
            rssmikle_item_description_length: "150",
            rssmikle_item_description_color: "#333333",
            rssmikle_item_date: "gl1",
            rssmikle_timezone: "Etc/GMT",
            datetime_format: "%b %e, %Y %l:%M:%S %p",
            item_description_style: "text+tn",
            item_thumbnail: "crop",
            article_num: "15",
            rssmikle_item_podcast: "player",
            keyword_inc: "",
            keyword_exc: ""
        };
        feedwind_show_widget_iframe(params);
    })();
    &#13;
    &#13;
    &#13;

答案 1 :(得分:0)

第一个停靠点是使用Feed网站上提供的自定义工具尝试修改Feed的样式。如果不这样做,您可以尝试在页面上加载Feed后使用JQuery修改/删除内联样式。