博客园样式排版自定义
2013-11-13 17:54
267 查看
css
作用到全局:/*全局字符*/ html,body,div,span,em,dt,dd,li,a,textarea,input,select{ font:12px 'Segoe UI' , Tahoma, Geneva, Verdana !important; } /*首页菜单*/ #footer{display:none;}
作用到首页:
/*首页菜单*/ #nav_menu{height:23px;padding:5px 0 0 0;margin: 0px 7px 0 10px; position:absolute; width:100%;} /*隐藏首页顶部,尾部,左侧类别菜单*/ #hd_info,#header,#footer_bottom,#cate_title_block{display:none;} /*首页左右侧顶部位置*/ #side_right{top:46px;} #side_nav{display:none;} /* 博客列表容器 */ #main {margin: 10px 320px 0 10px !important;} .diggnum{line-height:32px !important;} /*首页博客标题*/ #post_list h3 a:link,#post_list h3 a:visited,#post_list h3 a:active,#post_list h3 a:hover{ font-size:14px !important; font-weight:bold !important; }
作用到园子:http://home.cnblogs.com/ , http://q.cnblogs.com/
/*园子顶部菜单*/ #hd_top{height:23px;} #hd_top_w{margin-top:3px;} /*园子外容器*/ #wrapper{width:1300px !important;} /*园子内容容器*/ #container_content{width: 1130px!important;} #container_content #main{width:880px!important;} #container_content #main .feed_body{width:820px!important;} /*闪存发言容器*/ #ing_block{width:700px!important;} /*园子向上滚动*/ #goTop a img {width:50px; height:50px;} /*闪存行距*/ #feed_list .ing_body, .ing_comments ul li{line-height:22px !important;} /*新闻标题*/ h2 a:link, h2 a:visited, h2 a:active, #news_title a:link,#news_title:visited,#news_title a:active {font-size:14px !important; font-weight:bold !important;}
JS代码
作用到首页:// ==UserScript== // @name Jason Cnblogs--博客园美化 // @namespace http://www.cnblogs.com/jasonoiu/ // @version 1.0 // @description 博客园美化 // @match http://www.cnblogs.com // @require http://common.cnblogs.com/script/jquery.js // @copyright 2013+, jasonoiu // ==/UserScript== // a function that loads jQuery and calls a callback function when jQuery has finished loading function addJQuery(callback) { var script = document.createElement("script"); script.setAttribute("src", "//common.cnblogs.com/script/jquery.js"); script.addEventListener('load', function() { var script = document.createElement("script"); script.textContent = "window.$=jQuery.noConflict(true);(" + callback.toString() + ")();"; document.body.appendChild(script); }, false); document.body.appendChild(script); } // the guts of this userscript function main() { //园子向上滚动位置图片 var winWidth=$(window).width(); $("#goTop").css("left",(winWidth-1000)/2+1000+50+"px"); $("#goTop a img").attr("src","http://images.cnblogs.com/cnblogs_com/jasonoiu/331885/o_webtop.jpg"); //show top pager //取登录的值 function getLoginStr(){ var str= $("#span_userinfo").html(); if(str!=""){ str=str.replace('·','').replace('·','').replace('·','').replace('·','').replace('·',''); $("#nav_menu").append(str); window.clearInterval(gl); } } var gl=self.setInterval(function(){getLoginStr()},1000); } // load jQuery and execute the main function addJQuery(main);
未完待续。。。
相关文章推荐
- 博客园样式自定义
- 自定义博客园的模板样式
- 自定义博客园Markdown样式.超简单!
- 自定义博客园样式
- 博客园自定义样式(标题 h1 h2 h3)
- 自定义博客园Markdown样式.超简单!
- 博客园自定义样式主题 -- cnblogs theme
- 博客园自定义——关于自己博客样式的自定义
- 为博客园添加目录的方法总结+自定义博客园样式
- 自定义博客园Markdown样式.超简单!
- 自定义 博客园样式
- 博客园自定义样式
- 自定义博客园Markdown样式.超简单!
- 自定义博客园主题样式
- 自定义你的博客园样式
- 自定义横向ProgressBar样式圆角改直角
- 自定义checkbox 复选框的样式以及控制 checkbox 复选框的大小
- Bootstrap排版——HTML元素的样式重定义
- Android中自定义ProgressBar的样式
- android 自定义title样式