我的Firefox Newtab頁面自定義CSS

今天就折騰這個了,其實這事情拖了好幾天。Firefox某次更新以后我舊的userContent.css不好使了。于是調整了一下弄的新的。

我沒用插件,只是單純用css實現的。用多了其實不那么熱愛折騰,只是實現一點簡單的功能,巴不得擴展裝的越少越好,(笑)

參考
http://bbs.kafan.cn/thread-1747407-1-1.html
http://bbs.kafan.cn/thread-1838559-1-1.html

我只是稍稍改一下about:newtab的九宮格而已,就用自定義userContent.css實現了,沒裝擴展。

以下code

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("about:newtab") {
/*屏蔽周圍元素*/
#newtab-customize-button {display: none !important;}
#newtab-intro-what {display: none !important;}    
#newtab-search-container {display: none !important;}/*搜索框隱藏*/
.newtab-control{display: true !important;}/*控制按鈕隱藏*/
.newtab-title{display: none !important;}/*網站名隱藏*/
.newtab-link:hover .newtab-title {display: block !important;}/*懸停顯示站點名*/


/*背景*/
    
#newtab-scrollbox:not([page-disabled]) {
    background: url(http://area.sinaapp.com/bingImg); /*http://area.sinaapp.com/bingImg?daysAgo=2*/
    background-color: #E8EDF1;
    color: rgb(0, 0, 0);
}




/*撥號區域尺寸、位置*/
.newtab-grid{
    max-width: 1400px !important;
    max-height: 500px !important;
    margin-top: 20px;
}
/*撥號尺寸、間隔*/
.newtab-cell{
    width: 250px !important;
    height: 155px !important;
    margin: 10px 10px !important;
}

/*撥號去圓角*/
.newtab-link {
    border-radius: 0!important;
}
.newtab-cell {
    border-radius: 0!important;
}
/*撥號透明度*/
/*
.newtab-thumbnail{opacity: 0.85 !important;}   
.newtab-cell:hover .newtab-thumbnail{opacity: 1 !important;}
*/
    
/*撥號邊框*/
.newtab-site {
  border-radius: inherit; 
  text-decoration: none;
  transition-property: top, left, opacity, box-shadow, background-color;
  box-shadow: none;
  border:none !important;
}
/*懸停邊框*/
.newtab-cell:not([ignorehover]) > .newtab-site:hover, .newtab-site[dragged] {
    border: 3px solid #7E7E7E;
    box-shadow: 0 0px 0px 0px #E2E3E4;
    margin: -2px;
    border-radius: 0;
}

/*文字顏色*/
#newtab-intro-what, .newtab-sponsored, .newtab-title {color: #E6E6E6;}

/*站點名*/
.newtab-title {
    background-color: rgba(25, 25, 25, 0.55) !important;
    color:white!important;
    font-size:13px!important;
    text-align:left !important;
    top:134px;
    bottom:auto!important;
    line-height:25px!important;
    padding:0px 10px!important;
}
.newtab-title:before {
    display:none!important;
}

/*控制按鈕*/
.newtab-control-pin{
    width:15px !important; height:15px !important;
    top:0px !important;left:0px !important;transition: 0.5s !important;}
.newtab-control-pin:not([pinned]) {background:gold !important;}
.newtab-control-pin[pinned="true"] {background:skyblue !important;}
.newtab-control-block {
    height: 15px !important;width: 15px!important;background:orangered !important;
    top:0px !important;right:0px !important;}
.newtab-control-block:hover {background:Red !important;transition: 0.5s !important;}

    
/*縮略圖*/
    [href*="www.baidu.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.baidu.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.chinaso.com"] .newtab-thumbnail {
        background: rgba(124, 192, 43, 1) url("http://cmsfile03.chinaso.com/group1/M00/1A/54/Cgqg11TcZiWAU7LMAAAaLXXZRTI293.jpg") center center no-repeat !important;
        background-size: 100% 80%!important;
    }
    [href*="email.163.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://mail.163.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.douban.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.douban.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="bbs.kafan.cn"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://bbs.kafan.cn") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.eastmoney.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.eastmoney.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="gouwu.hao123.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.hao123.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.zhihu.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.zhihu.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.google.com.hk"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.google.com.hk") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.bing.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.bing.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="pan.baidu.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://pan.baidu.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="weibo.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://weibo.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="zh.wikipedia.org"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://zh.wikipedia.org") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.youtube.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.youtube.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="douban.fm"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://douban.fm") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.lzu.edu.cn"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.lzu.edu.cn") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.outlook.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.outlook.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="ele.me"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://ele.me") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="waimai.meituan.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://waimai.meituan.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="tieba.baidu.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://tieba.baidu.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }   
    [href*="www.luoo.net"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.luoo.net") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="9.douban.com/"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://9.douban.com/") center center no-repeat !important;
        background-size: 100% 100%!important;
    } 
    [href*="www.facebook.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.facebook.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="www.renren.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.renren.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="twitter.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://twitter.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="plus.google.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://plus.google.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="mail.google.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://mail.google.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="mail.qq.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://mail.qq.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="www.huxiu.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.huxiu.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="36kr.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://36kr.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="www.guokr.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.guokr.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    }    
    [href*="jandan.net"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://jandan.net") center center no-repeat !important;
        background-size: 100% 100%!important;
    } 
    [href*="www.ithome.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.ithome.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    } 
    [href*="www.lofter.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.lofter.com") center center no-repeat !important;
        background-size: 100% 100%!important;
    } 
    [href*="www.youku.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.youku.com/") center center no-repeat !important;
        background-size: 100% 100%!important;
    } 
    [href*="www.alipay.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://www.alipay.com/") center center no-repeat !important;
        background-size: 100% 100%!important;
    } 
    [href*="tv.sohu.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("http://data.ie.sogou.com/favor/icon2.php?url=http://tv.sohu.com/") center center no-repeat !important;
        background-size: 100% 100%!important;
    } 
    [href*="www.firefoxfan.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("chrome://userchromejs/content/thumbnails/firefoxfan.png") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.quora.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("chrome://userchromejs/content/thumbnails/quora.png") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.inoreader.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("chrome://userchromejs/content/thumbnails/inoreader.png") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="www.pinterest.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("chrome://userchromejs/content/thumbnails/pinterest.png") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    [href*="500px.com"] .newtab-thumbnail {
        background: rgba(0, 0, 0, .05) url("chrome://userchromejs/content/thumbnails/500px.png") center center no-repeat !important;
        background-size: 100% 100%!important;
    }
    
} 
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 227,533評論 6 531
  • 序言:濱河連續發生了三起死亡事件,死亡現場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發現死者居然都...
    沈念sama閱讀 98,055評論 3 414
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事?!?“怎么了?”我有些...
    開封第一講書人閱讀 175,365評論 0 373
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 62,561評論 1 307
  • 正文 為了忘掉前任,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當我...
    茶點故事閱讀 71,346評論 6 404
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發上,一...
    開封第一講書人閱讀 54,889評論 1 321
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當著我的面吹牛,可吹牛的內容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 42,978評論 3 439
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 42,118評論 0 286
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當地人在樹林里發現了一具尸體,經...
    沈念sama閱讀 48,637評論 1 333
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 40,558評論 3 354
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發現自己被綠了。 大學時的朋友給我發了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 42,739評論 1 369
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,246評論 5 355
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質發生泄漏。R本人自食惡果不足惜,卻給世界環境...
    茶點故事閱讀 43,980評論 3 346
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,362評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 35,619評論 1 280
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 51,347評論 3 390
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 47,702評論 2 370

推薦閱讀更多精彩內容

  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 172,590評論 25 707
  • http://bbs.ybtop.com/thread-784279-1-1.htmlhttp://www.5zz...
    ef4502bffbeb閱讀 232評論 0 1
  • 2017.8.7 星期一 晴轉多云 親子日記(104) 今天立秋了,還是挺熱!今天把兒子送到老媽那里了。今天很聽話...
    于澤媽媽閱讀 180評論 0 0
  • 十八 兩周過去了,歐陽丹恢復得很好,臉上再次泛出血色,一度凹陷的...
    cb0eb3d25744閱讀 368評論 0 2
  • 何謂自由? 于我而言 自由是可以根據自己所喜好,主宰自己的生活。但人活在世上總會有所牽絆,當我們在意的人日益增加,...
    cyrensw閱讀 485評論 0 5