如何使用 CSS 在文件語言中指定目標媒體


若要指定目標媒體,請使用 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>

更新於: 2020 年 3 月 16 日

54 次瀏覽

啟動您的 職業生涯

完成課程並獲得認證

開始學習
廣告
© . All rights reserved.