css样式表格线合并
When a user comments on one of my blog posts, and they provide a website URL, I always visit the site. I appreciate the time a visitor takes to comment on a post, so I return the favor by checking out the user's website...and the source code.
当用户对我的一篇博客文章发表评论并提供网站URL时,我总是会访问该网站。 我很感谢访问者对帖子发表评论所花费的时间,因此我通过查看用户的网站...和源代码来回馈青睐。
Often I see the following:
我经常看到以下内容:
<link href="styles/main.css" rel="stylesheet" type="text/css" media="screen" />
<link href="styles/print.css" rel="stylesheet" type="text/css" media="print" />
The above code requests two separate stylesheets, one for global media styles (screen, print, handheld, tv...) and one for print only. There's nothing wrong with the above, but if load time is an issue you could save yourself a server request by combining your CSS files:
上面的代码要求两个单独的样式表,一个用于全局媒体样式(屏幕,打印,手持式,电视...),一个仅用于打印。 上面没有什么问题,但是如果加载时间有问题,您可以通过组合CSS文件来节省服务器请求:
/* all media */
@media all {
body { color:#666; font:13px arial, helvetica, sans-serif; padding:20px 0 30px 0; }
}
@media print {
body { color:#000; font:12px arial, helvetica, sans-serif; padding:0; }
}
You address each media by using "@media [media] { /* css here */ }". I also use a single CSS file to make editing easier -- no switching buffers, and how often do you set specific styles for print and screen per a CSS class?
您可以使用“ @media [media] {/ * css here * /}”来寻址每种媒体。 我还使用一个CSS文件来简化编辑-没有切换缓冲区,并且每个CSS类您多久为打印和屏幕设置特定样式?
css样式表格线合并