我的Firefox Newtab頁面自定義CSS

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

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

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

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

以下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;}/*網(wǎng)站名隱藏*/
.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);
}




/*撥號區(qū)域尺寸、位置*/
.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;
    }
    
} 
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

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

友情鏈接更多精彩內(nèi)容