第一篇、自定义博客园的css样式并让其支持响应式
2016-10-05 10:45
260 查看
css文件:
页首代码:
<style type="text/css"> #cnblogs_post_body { color: black; font: 0.875em/1.5em "微软雅黑" , "PTSans" , "Arial" ,sans-serif; font-size: 16px; } #cnblogs_post_body h1 { background: #2B6695; border-radius: 6px 6px 6px 6px; box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5); color: #FFFFFF; font-family: "微软雅黑" , "宋体" , "黑体" ,Arial; font-size: 17px; font-weight: bold; height: 25px; line-height: 25px; margin: 15px 0 !important; padding: 5px 0 5px 20px; text-shadow: 2px 2px 3px #222222; } @media screen and (min-width: 1px) and (max-width: 800px) { #mytopmenu { margin-left: 0; margin-right: 0; width: 100%; } #centercontent { padding-left: 0; padding-right: 0; width: 100%; } #leftcontent { width: 100%; position: static; width: 100%; } #footer { margin: 0; width: 100%; } #comment_form { display: none; } #header { display: none; } #green_channel { display: none; } #centercontent img { width: 98% !important; } } </style>
页首代码:
<script type="text/javascript"> var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'initialwidth=device-width,initial-scale=1'); document.getElementsByTagName('head')[0].appendChild(meta); </script>
相关文章推荐
- 自定义css样式美化博客园
- 自定义css样式美化博客园
- wordpress主题支持自定义菜单及修改css样式实现方法
- onMeasure()源码分析及自定义View对于wrap_content的支持
- As3.0 htmlText支持的css样式
- 响应式网站开发框架Bootstrap中Carousel插件的使用及使之支持手机端
- 浮动居中js广告插件,支持详细的自定义:最大化播放时长,二次最大化间隔,不显示的url等
- 博客园使用highlight.js对代码进行高亮,并实现自定义关键词高亮
- 自定义Remote验证(对博客园文章“Asp.net MVC验证哪些事(3)-- Remote验证及其改进(附源码)”自定义验证的改进)
- smarty自定义插件,支持模板传参数调用数据
- 自定义ViewGroup-自定义LayoutParams支持显示方位
- 刚在博客园安个家,欢迎大家来踩踩,支持一下
- 【原创】自定义Membership,KSPMembership发布,支持多数据库(mysql/oracle/sqlserver)
- 开博第一篇:我来了 博客园
- 自定义ajax支持跨域组件封装
- 如何在博客园中自定义导航菜单
- 设置自定义ASP.NET服务器控件TagPrefix的几种方法 (博客园)
- 【转】Rancher 2.0 里程碑版本:支持添加自定义节点!
- 自定义CSDN Blog的CSS样式
- Spring扩展Schema提供自定义配置支持