如何指定一組 CSS 規則的目標媒體型別


Link 元素上的 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-03-16

129 次瀏覽

開啟你的職業生涯

完成該課程即可獲得認證

開始吧
廣告
© . All rights reserved.