不同的屏幕/打印样式表? [英] different style sheets for screen/printing?
问题描述
您好,
我使用大字体发布了一些网页,并希望为
用户提供使用较小字体打印页面的机会。
我相信这可以使用不同的样式表吗?我不是用b $ b清楚用户如何选择不同的.css文件?
似乎比拥有重复的html文件更容易......
感谢任何帮助!
干杯
Geoff
Geoff Cox写道:我使用大字体发布一些网页,并希望给出
用户有机会使用较小的字体打印页面。
我相信这可以使用不同的样式表吗?我不清楚用户如何选择不同的.css文件?
您无需选择其他CSS文件,而是指定
< link>中的媒体元素
< link rel =" stylesheet"媒体= QUOT;屏幕"类型= QUOT;文本/ CSS" href =" screen.css">
< link rel =" stylesheet"媒体= QUOT;打印"类型= QUOT;文本/ CSS" href =" print.css">
-
Martin Honnen
http://JavaScript.FAQTs.com/
< blockquote> On Thu,2003年10月16日12:09:29 +0200,Martin Honnen< ma ******* @ yahoo.de>
写道:
< link rel =" stylesheet"媒体= QUOT;屏幕"类型= QUOT;文本/ CSS" href =" screen.css">
< link rel =" stylesheet"媒体= QUOT;打印"类型= QUOT;文本/ CSS" href =" print.css">
Martin,
我有点迷失在这里!我使用我的2
不同的.css文件添加了以上2行,但是当我从浏览器打印时,打印了
更大的字体文本...我是在这里遗漏了什么?!
干杯
Geoff
Geoff Cox写道:
On Thu,2003年10月16日12:09:29 +0200,Martin Honnen< ma *** ****@yahoo.de>
写道:< link rel =" stylesheet"媒体= QUOT;屏幕"类型= QUOT;文本/ CSS" href =" screen.css">
< link rel =" stylesheet"媒体= QUOT;打印"类型= QUOT;文本/ CSS" href =" print.css">
我有点迷失在这里!我使用我的2个不同的.css文件添加了上面两行但是当我从浏览器打印时,打印出更大的字体文本...我在这里遗漏了什么?!
我没有看到建议的行有什么问题。
您使用的是哪种浏览器?像IE6 / Win,Netscape 7或Opera
7这样的浏览器肯定应该支持打印媒体的样式表,旧的
浏览器如Netscape 4不支持。
-
Martin Honnen
http://JavaScript.FAQTs.com/
Hello,
I publish some web pages using large fonts and would like to give the
user the opportunity to print the pages using a smaller font.
I believe that this is possible using different style sheets? I am not
clear how the user would select the different .css files?
Seems to be easier than having duplicate html files ...
Appreciate any help!
Cheers
Geoff
Geoff Cox wrote:I publish some web pages using large fonts and would like to give the
user the opportunity to print the pages using a smaller font.
I believe that this is possible using different style sheets? I am not
clear how the user would select the different .css files?
There is no need for you to select a different CSS file, rather specify
the media in the <link> element
<link rel="stylesheet" media="screen" type="text/css" href="screen.css">
<link rel="stylesheet" media="print" type="text/css" href="print.css">
--
Martin Honnen
http://JavaScript.FAQTs.com/
On Thu, 16 Oct 2003 12:09:29 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:
<link rel="stylesheet" media="screen" type="text/css" href="screen.css">
<link rel="stylesheet" media="print" type="text/css" href="print.css">
Martin,
I''m a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!
Cheers
Geoff
Geoff Cox wrote:
On Thu, 16 Oct 2003 12:09:29 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:<link rel="stylesheet" media="screen" type="text/css" href="screen.css">
<link rel="stylesheet" media="print" type="text/css" href="print.css">
I''m a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!
I don''t see anything wrong with the suggested lines.
Which browser are you using? Browsers like IE6/Win, Netscape 7 or Opera
7 should certainly support the stylesheet for print media, older
browsers like Netscape 4 don''t support that.
--
Martin Honnen
http://JavaScript.FAQTs.com/
这篇关于不同的屏幕/打印样式表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!