如何使用 CSS 在文档语言中指定目标媒体

cssweb developmentfront end technology更新于 2025/9/9 6:36:17

要指定目标媒体,请使用 media 属性 −

示例

<style>
   <!--
      <!doctype html public "-//w3c//dtd html 4.0//en">
      <html>

         <head>
            <title>link to a target medium</title>
            <link rel="stylesheet" type="text/css" media="print, handheld" href="foo.css">
         </head>

         <body>
            <p>the body...
         </body>

      </html>
   -->
</style>

相关文章


有用资源