主题样式表
主题样式表
下面是样式表头部注释的例子,被称作样式表头注释。比如主题
/*
Theme Name: Twenty Thirteen
Theme URI: http://wordpress.org/themes/twentythirteen
Author: the WordPress team
Author URI: http://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: twentythirteen
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/
样式表指南
- 当创作你的
CSS 的时候请参考CSS 编码标准。 - 尽可能使用有效的
CSS 。作为例外,也可以使用一些前缀,遵循CSS3 标准。 - 尽量减少使用
CSS hacks 。明显浏览器支持( 如IE) 是个例外,如果可能的话,将CSS hack 文件区分开来或者使用独立的文件。 - 所有的
HTML 元素应该有样式声明,无论是文章页面还是评论部分。- 表格,标题,图片,列表,块引用,等等。
- 强烈建议添加打印友好的字体
- 你能通过使用
media="print"
属性来包含一个适用于打印的样式表文件,或者在你的主样式表文件中增加一部分专为打印提供的设置。
- 你能通过使用