如需移除,請網站管理者移除.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Print Friendly</title>
<style type="text/css">
.cContent
{
margin-top: 10px;
margin-left: 10px;
width: 400px;
border: dotted 1px #444444;
}
/* 可以用@media mediaType的方式宣告不同媒體專用樣式 */
@media screen
/* 螢幕上是藍底白字 */
color: White;
background-color: Blue;
@media print
/* 列印時是白紙黑字的 */
.cContent { color: #222222; }
</style>
<!-- link, style可用media="mediaType"宣告適用時機 -->
<style type="text/css" media="screen">
/* 顯示時隱藏 */
.cPrint { display: none; }
<style type="text/css" media="print">
/* 列印時隱藏 */
.cScreen { display: none; }
</head>
<body>
<div class="cPrint">Print Header</div>
<div class="cScreen">Display Header</div>
<blockquote class="cContent">
One of the most important features
...
certain media types.
</blockquote>
</body>
</html>
回覆