CYBER@GARDEN

『Web標準の教科書』各章

home > 『Web標準の教科書』読者サポートページ > 第6章 第16節

第6章 第16節(p.478-485)

body {
  color: navy;
  background: silver;
  }

@media print {
  body {
    color: black;
    background: none;
    }
  }
<link rel="stylesheet" type="text/css" media="screen, tv"
href="/css/default.css" />
<link rel="stylesheet" type="text/css" media="print"
href="/css/print.css" />
<style type="text/css">
@import url("./css/default.css") screen, tv;
@import url("./css/print.css") print;
</style>
#visual, #sidebar, #globalnav, #search, #ad {
  display: none;
  }
#content {
  width: auto;
  float: none;
  margin: 0;
  padding: 0;
  }
body {
  font-family: Verdana, Arial, sans-serif;
  font-size: small;
  line-height: 1.5;
  }
a:link, a:visited {
  text-decoration: underline;
  }
a:link:after, a:visited:after {
  content: " (" attr(href) ") ";
  font-size: x-small;
  }
/* 内部リンク向けにサイトのURIを書き出す */
a[href^="/"]:after {
  content: " (http://www.cybergarden.net" attr(href) ") ";
  font-size: x-small;
  }

/* mailto:スキームの場合はURIを書き出さない */
a[href^="mailto:"]:after {
  content: "";
  }
body {
  background: none;
  color: black;
  font-family: Verdana, Arial, sans-serif;
  font-size: small;
  line-height: 1.5;
  }
pre {
  background: none;
  color: black;
  border: 1px solid black;
  }
em {
  color: black;
  font-style: normal;
  font-weight: bold;
  }
:
:
h3 { page-break-before: always; }
p { page-break-inside: avoid; }
p { orphans: 3; }