<table id="wscis"><del id="wscis"></del></table>
<tbody id="wscis"><td id="wscis"></td></tbody>
<table id="wscis"><th id="wscis"></th></table>
  • \n
    \n\n\n\n

    From the code above, we're setting up a simple HTML wrapper for our project where the JavaScript will render content in the

    \n\n

    The main.js code should look something like this:
    \n<\/p>\n\n

    import \".\/style.css\";\n\ndocument.querySelector(\"#app\").innerHTML = `\n  
    \n

    \n\n\n\n

    This is where we use document.querySelector() to add content to the element we insert our content into using the id: #<\/p>\n\n

    And the style.css code should look something like this:
    \n<\/p>\n\n

    body {\n  font-family: 'Kyiv Sans';\n}\n\n@font-face {\n  font-family: 'Kyiv Sans';\n  src: url('\/font\/KyivTypeSans-VarGX.ttf');\n  font-weight: 0 1000;\n  font-display: swap;\n}\n\nh1 {\n  color: #bd0c0c;\n  height: 100vh;\n  display: grid;\n  place-content: center;\n  margin: 0;\n  text-align: center;\n}\n\n.variable-font {\n  font-family: 'Kyiv Sans';\n  font-size: 5rem;\n  line-height: 1.1;\n  font-weight: 100;\n  font-variation-settings:\n   'wght' 100, 'CONT' 250, 'MIDL' 0;\n  transition: font-variation-settings 500ms;  \n}\n\n.variable-font:hover {\n  font-weight: 1000;\n  font-variation-settings:\n    'wght' 1000, 'CONT' 250, 'MIDL' -1000;\n}\n<\/pre>\n\n\n\n

    現(xiàn)在,讓我們解釋一下上面程式碼中發(fā)生的事情:<\/p>\n\n

    設定正文的預設字體:<\/strong>
    \n<\/p>

    npm create vite@latest\n<\/pre>\n\n\n\n<\/pre>\n
      \n
    • \n用途<\/strong>:這將整個文件的預設字體設為「Kyiv Sans」。 <\/li>\n
    • \n影響<\/strong>:正文中的所有文字元素都將繼承此字體,除非被更具體的樣式覆蓋。 <\/li>\n<\/ul>\n\n

      定義自訂字體:<\/strong>
      \n<\/p>\n\n

      npm run dev\n<\/pre>\n\n\n\n
        \n
      • \n用途<\/strong>:@font-face 規(guī)則可讓您定義自訂字體。 <\/li>\n
      • \n字型名稱<\/strong>:字型名為「Kyiv Sans」。 <\/li>\n
      • \n來源<\/strong>:字型檔位於\/font\/KyivTypeSans-VarGX.ttf。 <\/li>\n
      • \n字體粗細範圍<\/strong>:此字體支援0到1000的粗細範圍,使其成為可變字體。 <\/li>\n
      • \n字體顯示<\/strong>:交換確保使用後備字體立即顯示文本,直到載入自訂字體。 <\/li>\n<\/ul>\n\n

        設計

        樣式元素:<\/h1><\/strong>
        \n<\/p>\n\n
        \n\n  \n    \n    \n\n    Variable font<\/title>\n  <\/head>\n  <body>
        <h1><a href="http://m.miracleart.cn/">国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂</a></h1>\n    <div>\n\n\n\n<p>From the code above, we're setting up a simple HTML wrapper for our project where the JavaScript will render content in the <div>\n\n<p>The main.js code should look something like this:<br>\n<\/p>\n\n<pre>import \".\/style.css\";\n\ndocument.querySelector(\"#app\").innerHTML = `\n  <div>\n    <h1>\n\n\n\n<p>This is where we use document.querySelector() to add content to the element we insert our content into using the id: #<\/p>\n\n<p>And the style.css code should look something like this:<br>\n<\/p>\n\n<pre>body {\n  font-family: 'Kyiv Sans';\n}\n\n@font-face {\n  font-family: 'Kyiv Sans';\n  src: url('\/font\/KyivTypeSans-VarGX.ttf');\n  font-weight: 0 1000;\n  font-display: swap;\n}\n\nh1 {\n  color: #bd0c0c;\n  height: 100vh;\n  display: grid;\n  place-content: center;\n  margin: 0;\n  text-align: center;\n}\n\n.variable-font {\n  font-family: 'Kyiv Sans';\n  font-size: 5rem;\n  line-height: 1.1;\n  font-weight: 100;\n  font-variation-settings:\n   'wght' 100, 'CONT' 250, 'MIDL' 0;\n  transition: font-variation-settings 500ms;  \n}\n\n.variable-font:hover {\n  font-weight: 1000;\n  font-variation-settings:\n    'wght' 1000, 'CONT' 250, 'MIDL' -1000;\n}\n<\/pre>\n\n\n\n<\/pre>\n<ul>\n<li>\n<strong>顏色<\/strong>:將文字顏色設定為#bd0c0c,紅色陰影。 <\/li>\n<li>\n<strong>高度<\/strong>:高度設定為100vh,使得<h1>元素跨越視口的整個高度。 <\/h1>\n<\/li>\n<li>\n<strong>顯示<\/strong>:網格用於佈局,允許使用網格屬性。 <\/li>\n<li>\n<strong>居中內容<\/strong>:位置內容:中心使內容垂直和水平居中。 <\/li>\n<li>\n<strong>邊距<\/strong>:邊距設定為 0 以刪除 <h1> 周圍的任何預設間距。 <\/h1>\n<\/li>\n<li>\n<strong>文字對齊方式<\/strong>:文字水平居中。 <\/li>\n<\/ul>\n\n<p><strong>設定 .variable-font 類別的樣式:<\/strong><br>\n<\/p>\n\n<pre>body {\n  font-family: 'Kyiv Sans';\n}\n<\/pre>\n\n\n\n<ul>\n<li>\n<strong>字型系列<\/strong>:使用「Kyiv Sans」作為文字。 <\/li>\n<li>\n<strong>字體大小<\/strong>:將字體大小設定為5rem(相對於根元素的字體大小)。 <\/li>\n<li>\n<strong>行高<\/strong>:1.1 確保行間有輕微的間距。 <\/li>\n<li>\n<strong>字型粗細<\/strong>:初始設定為100。 <\/li>\n<li>\n<strong>字體變體設定<\/strong>:利用可變字體的自訂變體設定:\n\n<ul>\n<li>\n'wght' 控制權重(初始為 100)。 <\/li>\n<li>\n'CONT' 和 'MIDL' 是該字體的自訂軸,最初分別設定為 250 和 0。 <\/li>\n<\/ul>\n\n\n<\/li>\n\n<li>\n\n<strong>過渡<\/strong>:在 500 毫秒內平滑過渡字體變化設定。 <\/li>\n\n<\/ul>\n\n<p><strong>為.variable-font添加懸停效果:<\/strong><br>\n<\/p>\n<pre>npm create vite@latest\n<\/pre>\n\n\n\n<ul>\n<li>\n<strong>懸停時的字體粗細<\/strong>:當元素懸停在上方時改為 1000。 <\/li>\n<li>\n<strong>懸停時的字體變化設定<\/strong>:將變化設定更新為:\n\n<ul>\n<li>\n「重量」為 1000\n<\/li>\n<li>\n「繼續(xù)」仍為 250\n<\/li>\n<li>\n“MIDL”更改為-1000\n<\/li>\n<\/ul>\n\n\n<\/li>\n\n<li>\n\n<strong>效果<\/strong>:當使用者將滑鼠停留在文字上時創(chuàng)建動態(tài)、互動的視覺效果,突顯可變字體的靈活性。 <\/li>\n\n<\/ul>\n\n<p>最後我們的結果看起來有點像這樣;<br>\n<img src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/000\/173372755661469.jpg\" alt=\"Variable Fonts for Dynamic Typography\"><\/p>\n<h2>\n  \n  \n  使用可變字體建立響應式版式\n<\/h2>\n\n<p>透過讓設計師實現(xiàn)跨多種裝置和螢幕尺寸的完美適應,具有各種字體的響應式排版改變了線上設計??勺冏煮w具有無與倫比的多功能性,它允許在單一字體檔案中不斷更改字體屬性,包括粗細、寬度和對比度。設計人員可以使用 CSS 和媒體查詢動態(tài)更改這些字體屬性,以提高可讀性和美觀性,確保文字在從桌面顯示器到手機的任何裝置上呈現(xiàn)最佳效果。由於單一可變字體可以取代多個固定字體文件,因此減少了大量字體載入的需要並提高了網站效能。這種靈活性不僅改善了使用者體驗,也簡化了設計流程。如果沒有響應式排版——它變得更有吸引力、更有高效,並且可以使用不同的字體進行存取——現(xiàn)代網頁設計就不可能存在。 <\/p>\n<h3>\n  \n  \n  媒體查詢:螢幕尺寸適應大師\n<\/h3>\n\n<p>媒體查詢是響應式網頁設計的基石,是螢幕尺寸適應的大師?;妒褂谜咴O備的功能(例如螢幕寬度、高度、解析度和方向),它們允許設計人員應用特定的 CSS 樣式。媒體搜尋可協(xié)助設計人員確保網站在各種裝置(從筆記型電腦和桌上型顯示器到智慧型手機和平板電腦)上都能以最佳方式呈現(xiàn)和運作。 <\/p>\n\n<p>媒體查詢的強大之處在於它們能夠產生適合各種螢幕尺寸的靈活且流暢的佈局。媒體查詢允許設計人員更改字體大小、更改網格佈局,甚至根據視窗測量隱藏或顯示某些項目。這確保了無論使用什麼設備,材料都能保持其美觀性和可訪問性。 <\/p>\n\n<p>媒體查詢定義斷點-佈局調整以適應不同螢幕尺寸的特定位置。針對不同的設備,這些斷點是使用 min-width、max-width 和其他 CSS 特性設定的。例如,媒體查詢可能會為 768 像素或更小的螢幕寬度指定使用適合行動裝置的佈局,並為較大的顯示器指定不同的佈局。 <\/p>\n<p>將媒體搜尋納入網頁設計可提高可近性和使用者體驗。在所有平臺上,媒體查詢透過保證文字可讀、導航直觀且材料組織良好,有助於開發(fā)包容性數位體驗。任何希望創(chuàng)建響應式、適應性強和用戶友好的網站的網頁設計師都必須先學習在不同裝置使用時代的媒體查詢。 <\/p>\n\n<p>這是一個例子:<br>\n<\/p>\n\n<pre>npm create vite@latest\n<\/pre>\n\n\n\n<p>在此範例中,我們使用媒體查詢根據螢幕尺寸調整字體變化設定和字體粗細。對於最大寬度為 600px 的設備,字體大小會減少為 3rem。針對 :hover 效果相應調整粗細和其他變化,對於寬度在 601px 到 1200px 之間的設備,字體大小設定為 4rem,並調整粗細和變化。對於寬度為1201px及以上的設備,字體大小為5rem,保持原來的設定。 <br>\n這些媒體查詢可確保字體適應不同的螢幕尺寸,從而提高各種裝置上的可讀性和使用者體驗。 <\/p>\n\n<p><img src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/000\/173372755720318.jpg\" alt=\"Variable Fonts for Dynamic Typography\"><\/p>\n\n<p>上圖為小螢幕的顯示<\/p>\n\n<p><img src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/000\/173372755876188.jpg\" alt=\"Variable Fonts for Dynamic Typography\"><\/p>\n\n<p>上圖顯示了中螢幕的顯示<\/p>\n\n<p><img src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/000\/173372755953201.jpg\" alt=\"Variable Fonts for Dynamic Typography\"><\/p>\n\n<p>上圖為大螢幕顯示<\/p>\n<h3>\n  \n  \n  視口單位:使佈局流暢\n<\/h3>\n\n<p>視窗單元是現(xiàn)代網頁設計中的強大工具,可以創(chuàng)建流暢且響應式的佈局,無縫適應不同的螢幕尺寸。視口單位包括vw(視口寬度)和vh(視口高度),它們是相對於瀏覽器視窗的尺寸而言的。 1 vw 等於視口寬度的 1%,1 vh 等於視口高度的 1%。這些單元可協(xié)助設計人員確保元素根據使用者螢幕的大小進行縮放,從而產生更具動態(tài)性和適應性的設計。例如,以視窗單位設定字體大小、填滿或邊距,可以讓文字和物件自動調整大小,從而在多個裝置上保持一致的外觀。無論網站顯示在大型桌面顯示器或小型行動螢幕上,這種適應性都可以確保內容保持可讀性和美觀性,從而增強用戶體驗。視口單元讓設計人員能夠創(chuàng)建適應性強的佈局,可以輕鬆移動以適應數位設備不斷變化的地形。 <\/p>\n\n<p>以下是如何使用 vw 根據視窗寬度調整字體大小的範例:<br>\n<\/p>\n<pre>npm create vite@latest\n<\/pre>\n\n\n\n<p>在此範例中,在上面的程式碼中,.variable-font 的 font-size 屬性是使用視窗寬度 vw 單位設定的,使文字大小響應於視窗的寬度。 <\/p>\n\n<p>我們可以將媒體搜尋和具有不同字體特徵的視口單元結合起來,創(chuàng)建真正響應式的排版,優(yōu)雅地適合每種設備或螢幕尺寸。這使我們能夠提供出色的用戶體驗,而與某人為我們網站選擇的存取方法無關。 <\/p>\n\n<h2>\n  \n  \n  具有可變字體的高級印刷效果\n<\/h2>\n\n<p>可變字體開啟了複雜印刷效果的新領域,使設計人員能夠創(chuàng)建高度客製化和動態(tài)的文字樣式。設計師現(xiàn)在可以透過不斷調整粗細、寬度和自訂軸等特性來創(chuàng)建無縫過渡和不尋常的視覺效果,而這些效果以前使用固定字體很難實現(xiàn)??梢酝高^調整字體動態(tài)來變更粗細、對比度和中線,從而提供對文字外觀的複雜控制。這種適應性在響應式設計中非常強,字體可以輕鬆調整以適應各種螢幕尺寸和方向。此外,互動式動畫允許文字響應用戶操作,例如懸停或單擊,產生有趣和身臨其境的體驗。視窗單元與不同的字體特徵相結合,確保排版保持流暢和可擴展,從而提高各種設備上的可讀性和外觀。利用這些複雜的功能,設計師可以透過擴展傳統(tǒng)排版的可能性來創(chuàng)建視覺上引人注目的數位材料。讓我們來探索一些擴展線上排版界限的有趣方法:<\/p>\n\n<h3>\n  \n  \n  流體版式\n<\/h3>\n\n<p>流體排版是一種設計方法,文字可以根據視口的大小動態(tài)縮放,從而在許多裝置上提供流暢且響應靈敏的閱讀體驗。視窗單元、媒體搜尋和可變更的字體讓流暢的排版確保文字保持清晰和視覺平衡,與螢幕尺寸無關。此方法消除了對固定字體大小的需求,並允許無縫更改,從而以適合不同顯示條件的方式提高可讀性和外觀。 <\/p>\n\n<p>這是一個例子:<br>\n<\/p>\n\n<pre>npm run dev\n<\/pre>\n\n\n\n<p>工作原理:<\/p>\n\n<p><strong>calc() 功能:<\/strong> 此函數透過組合相對單位 vw 和固定值 rem 來產生流體縮放效果。 font-size,例如,calc(2rem 2vw) 會對視窗寬度做出反應並確保基本尺寸。 <\/p>\n\n<p><strong>各種元素的流體排版:<\/strong> 許多元素(例如 h1、h2 和 p)可以使用流體排版保證文字在不同設備上適當縮放。 calc() 函數提供一個基本尺寸,其縮放因子隨視窗寬度而變化。 <\/p>\n<p><strong>可變字體:<\/strong>將流體排版與可變字體結合,您可以根據視口大小實現(xiàn)文字屬性的動態(tài)變化。 <br>\n此方法可確保文字在各種裝置和螢幕尺寸上保持美觀和可讀性。 <\/p>\n\n<p>透過動畫文本,動態(tài)排版賦予文本生命,並產生有趣和動態(tài)的視覺效果,吸引觀眾。此方法透過使用 JavaScript 和 CSS 動畫更改文字屬性來添加運動和互動。在使用可變字體的範例中,使用 :hover 效果對字體粗細進行動畫處理,我們示範了動態(tài)排版,即從較淺的粗細無縫過渡到較粗的粗細。這不僅強調了內容,還展示瞭如何透過流暢、即時的變化,改變字體可以改善使用者互動。動態(tài)排版使設計師能夠提高文字的視覺吸引力和可用性,增強其在互動式和有趣的數位環(huán)境中的基本作用。 <\/p>\n\n<h3>\n  \n  \n  例:懸停時的重量動畫\n<\/h3>\n\n\n\n<pre>npm create vite@latest\n<\/pre>\n\n\n\n<p>在這裡,我們使用平滑過渡將 .variable-font 元素的粗細設定為 :hover 時從常規(guī) 100 到粗體 1000 的動畫效果,從而創(chuàng)建微妙但有影響力的效果。 <\/p>\n\n<p>這些只是不同字體提供的一小部分富有想像的機會。從動態(tài)動畫到流暢佈局,有足夠的機會創(chuàng)造獨特且有趣的字體。只要有一點創(chuàng)意和對 CSS 的理解,我們就可以挑戰(zhàn)網頁設計規(guī)範並產生相當出色的使用者體驗。 <\/p>\n\n<h2>\n  \n  \n  結論\n<\/h2>\n\n<p>可變字體-Kyiv Sans 的最佳示範是透過將多種字體樣式分組到一個檔案中來轉換網路上的版式。透過減少HTTP查詢的數量,本發(fā)明簡化了流程、增加了設計靈活性並提高了效能。設計師可以充分利用 CSS 中的可變字體來製作響應式動態(tài)字體,完美適應各種螢幕尺寸和使用者互動。 <br>\n設計人員可以使用粗細、中間層效果和對比度等屬性以及媒體查詢和視口單元等回應方法來創(chuàng)建視覺上吸引人且易於存取的排版體驗??勺冏煮w是當代網頁設計的必要工具,因為它們的流動性為藝術表達提供了新的方向。 <\/p>\n<h2>\n  \n  \n  資源\n<\/h2>\n\n<ul>\n<li>查看 Netlify 上託管的即時預覽\n<\/li>\n<li>查看原始碼<\/li>\n<\/ul>\n\n<h2>\n  \n  \n  參考\n<\/h2>\n\n<ul>\n<li>可變字體<\/li>\n<li>OpenType<\/li>\n<li>Kyiv Sans<\/li>\n<li>視口<\/li>\n<li>字體<\/li>\n<li>註冊軸<\/li>\n<li>自訂軸<\/li>\n<li>@font-face<\/li>\n<li>類型網路<\/li>\n<li>字體松鼠<\/li>\n<li>\nAdobe 字型 <\/li>\n<li>字體彈簧<\/li>\n<li>Google字體<\/li>\n<li>\nVfonts.com <\/li>\n<li>ttf<\/li>\n<li>\n沃夫2 <\/li>\n<li>everythingfonts.com<\/li>\n<li>Behance.net<\/li>\n<li>媒體查詢<\/li>\n<li>px<\/li>\n<li>雷姆<\/li>\n<li>\n大眾<\/li>\n<li>\n嗯<\/li>\n<li>計算()<\/li>\n<\/ul>\n\n\n          \n\n            \n        "}	</script>
        	
        <meta http-equiv="Cache-Control" content="no-transform" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <script>var V_PATH="/";window.onerror=function(){ return true; };</script>
        </head>
        
        <body data-commit-time="2023-12-28T14:50:12+08:00" class="editor_body body2_2">
        	<link rel="stylesheet" type="text/css" href="/static/csshw/stylehw.css">
        <header>
            <div   id="377j5v51b"   class="head">
                <div   id="377j5v51b"   class="haed_left">
                    <div   id="377j5v51b"   class="haed_logo">
                        <a href="http://m.miracleart.cn/zh-tw/" title="" class="haed_logo_a">
                            <img src="/static/imghw/logo.png" alt="" class="haed_logoimg">
                        </a>
                    </div>
                    <div   id="377j5v51b"   class="head_nav">
                        <div   id="377j5v51b"   class="head_navs">
                            <a href="javascript:;" title="社群" class="head_nava head_nava-template1">社群</a>
                            <div   class="377j5v51b"   id="dropdown-template1" style="display: none;">
                                <div   id="377j5v51b"   class="languagechoose">
                                    <a href="http://m.miracleart.cn/zh-tw/article.html" title="文章" class="languagechoosea on">文章</a>
                                    <a href="http://m.miracleart.cn/zh-tw/faq/zt" title="合集" class="languagechoosea">合集</a>
                                    <a href="http://m.miracleart.cn/zh-tw/wenda.html" title="問答" class="languagechoosea">問答</a>
                                </div>
                            </div>
                        </div>
        
                        <div   id="377j5v51b"   class="head_navs">
                            <a href="javascript:;" title="學習" class="head_nava head_nava-template1_1">學習</a>
                            <div   class="377j5v51b"   id="dropdown-template1_1" style="display: none;">
                                <div   id="377j5v51b"   class="languagechoose">
                                    <a href="http://m.miracleart.cn/zh-tw/course.html" title="課程" class="languagechoosea on">課程</a>
                                    <a href="http://m.miracleart.cn/zh-tw/dic/" title="程式設計字典" class="languagechoosea">程式設計字典</a>
                                </div>
                            </div>
                        </div>
        
                        <div   id="377j5v51b"   class="head_navs">
                            <a href="javascript:;" title="工具庫" class="head_nava head_nava-template1_2">工具庫</a>
                            <div   class="377j5v51b"   id="dropdown-template1_2" style="display: none;">
                                <div   id="377j5v51b"   class="languagechoose">
                                    <a href="http://m.miracleart.cn/zh-tw/toolset/development-tools" title="開發(fā)工具" class="languagechoosea on">開發(fā)工具</a>
                                    <a href="http://m.miracleart.cn/zh-tw/toolset/website-source-code" title="網站源碼" class="languagechoosea">網站源碼</a>
                                    <a href="http://m.miracleart.cn/zh-tw/toolset/php-libraries" title="PHP 函式庫" class="languagechoosea">PHP 函式庫</a>
                                    <a href="http://m.miracleart.cn/zh-tw/toolset/js-special-effects" title="JS特效" class="languagechoosea on">JS特效</a>
                                    <a href="http://m.miracleart.cn/zh-tw/toolset/website-materials" title="網站素材" class="languagechoosea on">網站素材</a>
                                    <a href="http://m.miracleart.cn/zh-tw/toolset/extension-plug-ins" title="擴充插件" class="languagechoosea on">擴充插件</a>
                                </div>
                            </div>
                        </div>
        
                        <div   id="377j5v51b"   class="head_navs">
                            <a href="http://m.miracleart.cn/zh-tw/ai" title="AI工具" class="head_nava head_nava-template1_3">AI工具</a>
                        </div>
        
                        <div   id="377j5v51b"   class="head_navs">
                            <a href="javascript:;" title="休閒" class="head_nava head_nava-template1_3">休閒</a>
                            <div   class="377j5v51b"   id="dropdown-template1_3" style="display: none;">
                                <div   id="377j5v51b"   class="languagechoose">
                                    <a href="http://m.miracleart.cn/zh-tw/game" title="遊戲下載" class="languagechoosea on">遊戲下載</a>
                                    <a href="http://m.miracleart.cn/zh-tw/mobile-game-tutorial/" title="遊戲教程" class="languagechoosea">遊戲教程</a>
        
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                            <div   id="377j5v51b"   class="head_search">
                        <input id="key_words"  onkeydown="if (event.keyCode == 13) searchs('zh-tw')" class="search-input" type="text" autocomplete="off" name="keywords" required="required" placeholder="Block,address,transaction,news" value="">
                        <a href="javascript:;" title="搜尋"  onclick="searchs('zh-tw')"><img src="/static/imghw/find.png" alt="搜尋"></a>
                    </div>
                        <div   id="377j5v51b"   class="head_right">
                    <div   id="377j5v51b"   class="haed_language">
                        <a href="javascript:;" class="layui-btn haed_language_btn">繁體中文<i class="layui-icon layui-icon-triangle-d"></i></a>
                        <div   class="377j5v51b"   id="dropdown-template" style="display: none;">
                            <div   id="377j5v51b"   class="languagechoose">
                                                        <a href="javascript:setlang('zh-cn');" title="簡體中文" class="languagechoosea">簡體中文</a>
                                                        <a href="javascript:setlang('en');" title="English" class="languagechoosea">English</a>
                                                        <a href="javascript:;" title="繁體中文" class="languagechoosea">繁體中文</a>
                                                        <a href="javascript:setlang('ja');" title="日本語" class="languagechoosea">日本語</a>
                                                        <a href="javascript:setlang('ko');" title="???" class="languagechoosea">???</a>
                                                        <a href="javascript:setlang('ms');" title="Melayu" class="languagechoosea">Melayu</a>
                                                        <a href="javascript:setlang('fr');" title="Fran?ais" class="languagechoosea">Fran?ais</a>
                                                        <a href="javascript:setlang('de');" title="Deutsch" class="languagechoosea">Deutsch</a>
                                                    </div>
                        </div>
                    </div>
                    <span id="377j5v51b"    class="head_right_line"></span>
                                    <div style="display: block;" id="login" class="haed_login ">
                            <a href="javascript:;"  title="Login" class="haed_logina ">Login</a>
                        </div>
                        <div style="display: block;" id="reg" class="head_signup login">
                            <a href="javascript:;"  title="singup" class="head_signupa">singup</a>
                        </div>
                    
                </div>
            </div>
        </header>
        
        	
        	<main>
        		<div   id="377j5v51b"   class="Article_Details_main">
        			<div   id="377j5v51b"   class="Article_Details_main1">
        							<div   id="377j5v51b"   class="Article_Details_main1L">
        					<div   id="377j5v51b"   class="Article_Details_main1Lmain" id="Article_Details_main1Lmain">
        						<div   id="377j5v51b"   class="Article_Details_main1L1">目錄</div>
        						<div   id="377j5v51b"   class="Article_Details_main1L2" id="Article_Details_main1L2">
        							<!-- 左側懸浮,文章定位標題1 id="Article_Details_main1L2s_1"-->
        															<div   id="377j5v51b"   class="Article_Details_main1L2s ">
        									<a href="#樣式元素" title=" 樣式元素:" > 樣式元素:</a>
        								</div>
        																<div   id="377j5v51b"   class="Article_Details_main1L2s ">
        									<a href="#元素跨越視口的整個高度" title="元素跨越視口的整個高度。 " >元素跨越視口的整個高度。 </a>
        								</div>
        																<div   id="377j5v51b"   class="Article_Details_main1L2s ">
        									<a href="#周圍的任何預設間距" title=" 周圍的任何預設間距。 " > 周圍的任何預設間距。 </a>
        								</div>
        														</div>
        					</div>
        				</div>
        							<div   id="377j5v51b"   class="Article_Details_main1M">
        					<div   id="377j5v51b"   class="phpgenera_Details_mainL1">
        						<a href="http://m.miracleart.cn/zh-tw/" title="首頁"
        							class="phpgenera_Details_mainL1a">首頁</a>
        						<img src="/static/imghw/top_right.png" alt="" />
        												<a href="http://m.miracleart.cn/zh-tw/web-designer.html"
        							class="phpgenera_Details_mainL1a">web前端</a>
        						<img src="/static/imghw/top_right.png" alt="" />
        												<a href="http://m.miracleart.cn/zh-tw/css-tutorial.html"
        							class="phpgenera_Details_mainL1a">css教學</a>
        						<img src="/static/imghw/top_right.png" alt="" />
        						<span>動態(tài)排版的可變字體</span>
        					</div>
        					
        					<div   id="377j5v51b"   class="Articlelist_txts">
        						<div   id="377j5v51b"   class="Articlelist_txts_info">
        							<h1 class="Articlelist_txts_title">動態(tài)排版的可變字體</h1>
        							<div   id="377j5v51b"   class="Articlelist_txts_info_head">
        								<div   id="377j5v51b"   class="author_info">
        									<a href="http://m.miracleart.cn/zh-tw/member/1468490.html"  class="author_avatar">
        									<img class="lazy"  data-src="https://img.php.cn/upload/avatar/000/000/001/66ea8170af62b832.png" src="/static/imghw/default1.png" alt="Barbara Streisand">
        									</a>
        									<div   id="377j5v51b"   class="author_detail">
        																			<a href="http://m.miracleart.cn/zh-tw/member/1468490.html" class="author_name">Barbara Streisand</a>
                                        										</div>
        								</div>
                        			</div>
        							<span id="377j5v51b"    class="Articlelist_txts_time">Dec 09, 2024 pm	 02:59 PM</span>
        														
        						</div>
        					</div>
        					<hr />
        					<div   id="377j5v51b"   class="article_main php-article">
        						<div   id="377j5v51b"   class="article-list-left detail-content-wrap content">
        						<ins class="adsbygoogle"
        							style="display:block; text-align:center;"
        							data-ad-layout="in-article"
        							data-ad-format="fluid"
        							data-ad-client="ca-pub-5902227090019525"
        							data-ad-slot="3461856641">
        						</ins>
        						
        
        					<p>您是否覺得追蹤不同粗細和樣式的多個字體檔案很乏味?對於網頁設計師來說,為普通、粗體、斜體和其他字體變體創(chuàng)建不同的文件可能具有挑戰(zhàn)性。這使創(chuàng)作過程變得複雜並阻礙了他們的工作流程。將所有這些變體合併到一個文件中怎麼樣? </p>
        
        <p>這就是可變字體的用武之地??勺冏煮w是 OpenType 字體技術的突破性進步,它允許一個字體檔案包含多種變體,例如常規(guī)、粗體和斜體。這意味著設計人員只需使用一個文件即可存取他們所需的所有各種粗細、樣式和寬度。這項發(fā)明使得不斷輕鬆地修改重量、寬度和傾斜等特性變得簡單,從而簡化了設計過程並促進了創(chuàng)作自由。 </p>
        
        <p>以 Kyiv Sans 字體為例,本文將研究 CSS 中不同字體的相關性,並展示粗細等品質甚至 MIDL 等非標準字體變體的重要性。使用這些工具,我們將學習如何在 CSS 中製作動態(tài)且美觀的排版。 </p>
        
        <h2>
          
          
          可變字體簡介
        </h2>
        
        <p>可變字體技術架構使設計人員和開發(fā)人員可以使用 CSS 立即控制這些排版特徵,從而允許精確的更改以滿足專案的特定要求。這透過大幅降低載入時間並用單一可變字體檔案替換許多靜態(tài)字體檔案來提高 Web 效能。 </p>
        
        <p>可變字體的靈活性和準確性是傳統(tǒng)靜態(tài)字體文件聞所未聞的,構成了印刷技術的重大發(fā)展。傳統(tǒng)字體需要針對每種樣式和粗細的單獨文件,而可變字體則不同,它可以在一個可擴展文件中捕獲多種樣式。這是透過 OpenType 字體樣式實現(xiàn)的,該字體樣式允許沿著一個或多個軸不斷變化,例如粗細、寬度和光學尺寸。 </p>
        
        <h3>
          
          
          CSS 中可變字體的好處
        </h3>
        
        <p>我們將引導您了解如何使用這些工具建立動態(tài)且美觀的 CSS 排版。讓我們來看幾個例子:</p>
        
        <p><strong>效率:</strong>透過將多種字體樣式組合到一個檔案中,可變字體可以最大限度地減少 HTTP 請求,加快頁面載入速度並提高整體效率。 </p>
        
        <p><strong>靈活性:</strong>設計師可以精確地修改版式以適應不同的設計環(huán)境和使用者偏好,因為他們可以對 wght 等屬性以及 MIDL 和 CONT 等自訂屬性進行細粒度控制。 </p>
        
        <p><strong>平滑過渡:</strong>可變字體允許動態(tài)更改字體樣式,避免離散字體檔案之間的突然切換。因此,字體樣式之間的過渡平滑流暢。 </p>
        <p><strong>響應式排版:</strong>可變字體允許根據視口大小或其他使用者定義的參數進行調整,從而實現(xiàn)響應式排版,確??缪b置的最佳易讀性和美觀吸引力。 </p>
        
        <p><strong>動態(tài)排版:</strong>可變字體根據使用者互動或環(huán)境條件提供即時變化,因此支援動態(tài),提高使用者參與度並產生身臨其境的體驗。 </p>
        
        <p><strong>輔助功能:</strong>更廣泛的排版選項允許文字自訂和修改,以確??绺鞣N裝置和使用者偏好的易讀性和可讀性。 </p>
        
        <p><strong>美學:</strong>在網路上,可變字體激發(fā)創(chuàng)意設計理念並挑戰(zhàn)印刷界限,為印刷表達和實驗開闢新的機會。 </p>
        
        <p><strong>可擴展性:</strong>可變字體非常適合響應式設計,並保證文字在任何尺寸或解析度下都清晰易讀,因為它們可以在不損失品質的情況下進行擴展。 </p>
        
        <h3>
          
          
          介紹使用可變字體的響應式動態(tài)版式的概念
        </h3>
        
        <p>現(xiàn)代網頁設計允許設計師使用響應式和動態(tài)排版以及不斷變化的字體來創(chuàng)建更靈活和迷人的排版體驗,讓我們剖析這些想法:</p>
        
        <p>字體中的變數:變數字體是具有多種字體變體的單一字體文件,包括 wght 和特殊屬性 MIDL 和 CONT。與傳統(tǒng)字體相比,可變字體在版式設計中提供了更多的自由度和效率,傳統(tǒng)字體需要每種樣式都有不同的文件,並能夠在這些變體之間實現(xiàn)流暢的過渡。 </p>
        
        <p><strong>響應式排版:</strong>設計文字以輕鬆適應多種螢幕尺寸、解析度和檢視環(huán)境稱為響應式排版。從大型桌上型電腦到手機以及介於兩者之間的所有設備,這保證了許多設備上的最佳可讀性和美觀性。動態(tài)字體大小、行距和其他排版變更有助於響應式排版改善使用者體驗和可存取性。 </p>
        
        <p><strong>動態(tài)版式:</strong>動態(tài)版式透過將互動和動畫融入版式設計來增強響應式版式。 JavaScript 和 CSS(層疊樣式表)可協(xié)助設計人員開發(fā)適合內容變更、使用者互動或捲動行為的字體。動態(tài)排版使用 wght、MIDL 和 CONT 等組件來產生視覺吸引力和互動性,引導使用者註意力並吸引他們。 </p>
        <p>設計師透過將動態(tài)靈活的排版方法與不同的字體結合,創(chuàng)造出豐富、多功能、身臨其境的線上排版體驗。無論是根據使用者活動動態(tài)改變字體、動畫文字元素以突出顯示重要訊息,還是根據螢幕尺寸調整字體粗細和大小,這種方法都為數位設計中的創(chuàng)造力和發(fā)明提供了許多機會。 </p>
        
        <p>Kyiv Sans 的各種字體屬性允許設計師創(chuàng)建有趣且完美的印刷過渡。這透過增加網頁資料的美學吸引力和實用性來增強其互動性和用戶友善性。 </p>
        
        <h2>
          
          
          了解可變字體屬性
        </h2>
        
        <p>各種字體提供了傳統(tǒng)靜態(tài)字體所不具備的一系列新特徵。了解這些特徵對於充分發(fā)揮可變字體的潛力是必要的。這些是一些基本的:</p>
        
        <p><strong>重量 (wght):</strong> 沿著連續(xù)軸改變重量,可變字體可以在多個厚度等級之間實現(xiàn)無縫過渡。設計師可以在單一字體檔案中指定一系列粗細,從細到超粗,以及介於兩者之間的所有點。 </p>
        
        <p><strong>中間層效果 (MIDL):</strong> 此自訂軸可讓設計人員變更字體內的中間層效果。這可以賦予文字獨特的視覺風格,以及額外的設計自由和創(chuàng)造力。 </p>
        
        <p><strong>對比(CONT):</strong>另一個自訂軸是CONT,它可以改變字體的對比。透過根據設計要求動態(tài)改變對比度,這可以幫助最大限度地提高文字的可讀性和視覺吸引力。 </p>
        
        <p>理解和應用這些特質將幫助設計師製作出視覺上引人注目的字體。憑藉其不同的字體特徵,Kyiv Sans 提供了特殊的自訂選擇,可提高網頁排版的可用性和外觀。 </p>
        
        <h3>
          
          
          可變字體中可用的附加軸和變體概述
        </h3>
        
        <p>除了傳統(tǒng)的粗細、寬度和光學尺寸修改之外,可變字體還提供了廣泛的個人化選擇。以下是可能可用的軸和變體的摘要:</p>
        
        <p>可變字體設計者可能使用的幾個註冊軸由 OpenType 規(guī)格定義:</p>
        
        <ul>
        <li><p>寬度(wdth):此軸控製字體的水平擴展或壓縮,使設計者能夠修改字元的寬度。透過調整此軸,設計人員可以在不改變整體高度的情況下創(chuàng)建顯得更窄或更寬的字體,從而實現(xiàn)靈活的壓縮到擴展樣式。 </p></li>
        <li><p>傾斜(slnt):此軸允許設計者在不改變字形結構的情況下對字元應用類似斜體的傾斜。斜軸通常模仿傳統(tǒng)斜體的效果,但保留直立的字母形式,使其可用於創(chuàng)建風格變化。 </p></li>
        <li><p>斜體(ital):斜體軸在字體的直立和斜體版本之間切換。與僅傾斜字符的傾斜軸不同,斜體軸涉及字符的完全重新設計,以反映真正斜體的草書性質,提供更真實的斜體風格。 </p></li>
        <li><p>光學尺寸 (opsz):此軸調整字體的設計以優(yōu)化不同尺寸下的可讀性。例如,較小的尺寸可能具有較粗的筆劃和更多的開放式計數器,以獲得更好的易讀性,而較大的尺寸可能會更加精緻和精緻。該軸對於跨各種媒體的響應式排版特別有用。 </p></li>
        <li><p>等級(GRAD):等級軸允許對字體的筆劃粗細進行細微調整,而不影響整體間距。它對於提高不同列印或螢幕環(huán)境中的可讀性非常有用,其中稍微增加或減少粗細可以增強對比度和清晰度。 </p></li>
        <li><p>對比 (CNTR):此軸修改字體內粗筆畫和細筆畫之間的對比。透過調整對比度,設計師可以創(chuàng)造具有不同程度的強調和視覺衝擊力的字體,從低對比的人文風格到高對比度的現(xiàn)代設計。 </p></li>
        <li><p>X 高度 (xhgt):此軸調整小寫字母相對於字體大寫字母的高度。增加 x 高度可以提高小尺寸下的易讀性或創(chuàng)造更現(xiàn)代的外觀,而減少 x 高度可以喚起更傳統(tǒng)或正式的感覺。 </p></li>
        </ul>
        
        <p>除了註冊的軸之外,可變字體創(chuàng)建者還可以指定自己的自訂軸。關於 Kyiv Sans:這些包括:</p>
        
        <ul>
        <li><p>中間層效果(MIDL):此自訂軸為設計師提供了更多設計多功能性,並允許他們更改字體內的特定中間層效果,從而添加原始風格方面。 </p></li>
        <li><p>對比(繼續(xù)):此自訂軸有助於控製字母形式中粗筆畫和細筆畫之間的對比。設計師可以動態(tài)地改變這一特性,以實現(xiàn)各種程度的印刷表現(xiàn)力,從柔和的對比到更明顯的變化。 </p></li>
        </ul>
        
        <p>除了註冊的軸之外,建造新軸的選項還允許字體設計者實現(xiàn)對字體外觀和特徵的高度客製化和複雜控制。例如,MIDL 和 CONT 等自訂軸使設計人員能夠定製字體的特殊品質,從而實現(xiàn)靈活且富有表現(xiàn)力的排版。這些自訂與可變字體註冊相結合,提供了多種方法來創(chuàng)建不同的印刷效果。例如,中間層效果(MIDL)軸可讓設計師改變字體內獨特的中間層,添加獨特的視覺品質,從而增強藝術自由度。另一方面,對比度(CONT)軸控制粗筆畫和細筆畫之間的變化,允許動態(tài)調整範圍從微妙到明顯的對比。透過與「粗細」和「中間層效果」等軸交互,設計人員可以創(chuàng)建具有不同粗細和獨特樣式的文本,從而實現(xiàn)對字體外觀的精確控制。同樣,結合粗細和對比度的變化可以創(chuàng)建具有不同程度的粗體和筆劃對比度的文本,從而平衡視覺衝擊和可讀性。這些範例展示了註冊軸和自訂軸提供的無與倫比的自由度,使設計人員能夠根據自己特定的美學偏好和設計目標調整字體。 </p>
        
        <h2>
          
          
          在 CSS 中實現(xiàn)可變字體
        </h2>
        
        <p>現(xiàn)在您已經對可更改字體的可能性著迷了,讓我們研究一下如何在基於 CSS 的 Web 專案中應用它們。 CSS 提供了正確使用這些自適應字體功能的方法。首先使用 @font-face 定義字體,它允許您提供不同的字體檔案及其特徵。設定字體後,您可以使用不同的 CSS 屬性動態(tài)變更字體的軸,從而最大化不同字體提供的可能性。 </p>
        
        <h3>
          
          
          取得字體
        </h3>
        
        <p>首先,我們必須下載專案所需的可變字體。 <br>
        互聯(lián)網上的一些網站允許我們存取不同的字體檔案。一些最常用的字體網站如下:</p>
        
        <ul>
        <li>類型網路</li>
        <li>字體松鼠</li>
        <li>
        Adobe 字型 </li>
        <li>字體彈簧</li>
        <li>Google字體</li>
        <li>Vfonts.com</li>
        </ul>
        
        <p>在這個範例中,我們將前往 Vfonts.com 下載 Kyiv Sans 可變字體。 ttf 或 woff2 檔案格式運作正常,但我們將在本示範中使用 ttf。如果您需要將字體檔案從 ttf 轉換為 woff2,請前往 everythingfonts.com:</p>
        
        <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173372755444094.jpg" class="lazy" alt="Variable Fonts for Dynamic Typography"></p>
        
        <p>上面的螢幕截圖顯示了您到達 Vfont 時會看到的內容。 </p>
        
        <p>我們將專案分為以下步驟:</p>
        
        <ol>
        <li><p>導覽至 vfont:造訪提供可變字體資源的網站。 </p></li>
        <li><p>選擇 Kyiv* 類型:選擇 Kyiv* Type 字體,這會將您重定向到託管該字體的 Behance.net。 </p></li>
        <li><p>訪問下載連結:在 Behance 頁面上,一直向下滾動以找到下載字體的連結。 </p></li>
        <li><p>從 Google 雲端硬碟下載:點擊下載鏈接,您將進入 Google 雲端硬碟資料夾。從那裡下載字體檔案。 </p></li>
        <li><p>解壓縮檔案:下載後,解壓縮檔案以存取其內容。 </p></li>
        <li>
        <p>查看字型選項:解壓縮後的資料夾包含多個選項可供選擇。 </p>
        
        <ul>
        <li>圖示</li>
        <li>沒有變數</li>
        <li>變數</li>
        </ul>
        </li>
        <li>
        <p>選擇可變字體:專注於包含可變字體的檔案。 </p>
        
        <ul>
        <li>襯線</li>
        <li>傾斜</li>
        <li>Sans</li>
        </ul>
        </li>
        <li><p>使用 Sans 字體:設定和使用 Sans 版本的字體。請注意,Sans 字體粗細檔案為 360 KB,相當於使用八個非可變字體檔案。 </p></li>
        <li><p>評估權衡:考慮使用可變字體對於您的專案是否值得。如果您只需要常規(guī)、粗體和斜體樣式,則可能不需要使用可變字體。但是,如果您需要對變體進行高級控制,可變字體可能非常有用。 </p></li>
        </ol>
        
        <p>注意:以上這些文件都是TTF格式。 </p>
        
        <p>現(xiàn)在我們將前往 VSCode,我們將在其中使用普通的 vite 專案。 <br>
        要開始處理該項目,您必須安裝必要的套件。您必須按照以下步驟操作:</p>
        
        <ol>
        <li><p>開啟一個新終端。 </p></li>
        <li>
        <p>運行指令<br>
        </p>
        
        <pre class="brush:php;toolbar:false">npm create vite@latest
        </pre>
        
        
        
        
        </li>
        
        <li><p>為您的專案命名。 </p></li>
        
        <li><p>為您的包裹命名。 </p></li>
        
        <li><p>選擇一個 Vanilla 框架。 </p></li>
        
        <li><p>選擇 JavaScript 變體。 </p></li>
        
        <li><p>執(zhí)行 npm install 將協(xié)助您協(xié)商進入專案並安裝必要的模組。 </p></li>
        
        <li>
        
        <p>設定依賴項後,使用以下命令啟動應用程式:<br>
        </p>
        
        <pre class="brush:php;toolbar:false">npm run dev
        </pre>
        
        
        
        
        </li>
        
        <li><p>造訪 http://localhost:your-port-number 即可存取瀏覽器上正在執(zhí)行的程式。 </p></li>
        
        </ol>
        
        <p>一旦我們完成了我們的項目,我們將擁有大量的模擬程式碼,我們可以修改它們來建立我們想要的應用程式。下載的可變字體應放入字型資料夾中,該資料夾將放入公用資料夾中。我們將替換 style.css、main.js 和 index.html 中所有不必要的模擬程式碼。 </p>
        
        <p>index.html 程式碼應如下圖所示:<br>
        </p>
        
        <pre class="brush:php;toolbar:false"><!doctype html>
        <html lang="en">
          <head>
            <meta charset="UTF-8" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        
            <title>Variable font</title>
          </head>
          <body>
            <div>
        
        
        
        <p>From the code above, we're setting up a simple HTML wrapper for our project where the JavaScript will render content in the <div>
        
        <p>The main.js code should look something like this:<br>
        </p>
        
        <pre class="brush:php;toolbar:false">import "./style.css";
        
        document.querySelector("#app").innerHTML = `
          <div>
            <h1>
        
        
        
        <p>This is where we use document.querySelector() to add content to the element we insert our content into using the id: #</p>
        
        <p>And the style.css code should look something like this:<br>
        </p>
        
        <pre class="brush:php;toolbar:false">body {
          font-family: 'Kyiv Sans';
        }
        
        @font-face {
          font-family: 'Kyiv Sans';
          src: url('/font/KyivTypeSans-VarGX.ttf');
          font-weight: 0 1000;
          font-display: swap;
        }
        
        h1 {
          color: #bd0c0c;
          height: 100vh;
          display: grid;
          place-content: center;
          margin: 0;
          text-align: center;
        }
        
        .variable-font {
          font-family: 'Kyiv Sans';
          font-size: 5rem;
          line-height: 1.1;
          font-weight: 100;
          font-variation-settings:
           'wght' 100, 'CONT' 250, 'MIDL' 0;
          transition: font-variation-settings 500ms;  
        }
        
        .variable-font:hover {
          font-weight: 1000;
          font-variation-settings:
            'wght' 1000, 'CONT' 250, 'MIDL' -1000;
        }
        </pre>
        
        
        
        <p>現(xiàn)在,讓我們解釋一下上面程式碼中發(fā)生的事情:</p>
        
        <p><strong>設定正文的預設字體:</strong><br>
        </p><pre class="brush:php;toolbar:false">npm create vite@latest
        </pre>
        
        
        
        </pre>
        <ul>
        <li>
        <strong>用途</strong>:這將整個文件的預設字體設為「Kyiv Sans」。 </li>
        <li>
        <strong>影響</strong>:正文中的所有文字元素都將繼承此字體,除非被更具體的樣式覆蓋。 </li>
        </ul>
        
        <p><strong>定義自訂字體:</strong><br>
        </p>
        
        <pre class="brush:php;toolbar:false">npm run dev
        </pre>
        
        
        
        <ul>
        <li>
        <strong>用途</strong>:@font-face 規(guī)則可讓您定義自訂字體。 </li>
        <li>
        <strong>字型名稱</strong>:字型名為「Kyiv Sans」。 </li>
        <li>
        <strong>來源</strong>:字型檔位於/font/KyivTypeSans-VarGX.ttf。 </li>
        <li>
        <strong>字體粗細範圍</strong>:此字體支援0到1000的粗細範圍,使其成為可變字體。 </li>
        <li>
        <strong>字體顯示</strong>:交換確保使用後備字體立即顯示文本,直到載入自訂字體。 </li>
        </ul>
        
        <p><strong>設計 <h1 id="樣式元素"> 樣式元素:</h1></strong><br>
        </p>
        
        <pre class="brush:php;toolbar:false"><!doctype html>
        <html lang="en">
          <head>
            <meta charset="UTF-8" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        
            <title>Variable font</title>
          </head>
          <body>
            <div>
        
        
        
        <p>From the code above, we're setting up a simple HTML wrapper for our project where the JavaScript will render content in the <div>
        
        <p>The main.js code should look something like this:<br>
        </p>
        
        <pre class="brush:php;toolbar:false">import "./style.css";
        
        document.querySelector("#app").innerHTML = `
          <div>
            <h1>
        
        
        
        <p>This is where we use document.querySelector() to add content to the element we insert our content into using the id: #</p>
        
        <p>And the style.css code should look something like this:<br>
        </p>
        
        <pre class="brush:php;toolbar:false">body {
          font-family: 'Kyiv Sans';
        }
        
        @font-face {
          font-family: 'Kyiv Sans';
          src: url('/font/KyivTypeSans-VarGX.ttf');
          font-weight: 0 1000;
          font-display: swap;
        }
        
        h1 {
          color: #bd0c0c;
          height: 100vh;
          display: grid;
          place-content: center;
          margin: 0;
          text-align: center;
        }
        
        .variable-font {
          font-family: 'Kyiv Sans';
          font-size: 5rem;
          line-height: 1.1;
          font-weight: 100;
          font-variation-settings:
           'wght' 100, 'CONT' 250, 'MIDL' 0;
          transition: font-variation-settings 500ms;  
        }
        
        .variable-font:hover {
          font-weight: 1000;
          font-variation-settings:
            'wght' 1000, 'CONT' 250, 'MIDL' -1000;
        }
        </pre>
        
        
        
        </pre>
        <ul>
        <li>
        <strong>顏色</strong>:將文字顏色設定為#bd0c0c,紅色陰影。 </li>
        <li>
        <strong>高度</strong>:高度設定為100vh,使得<h1 id="元素跨越視口的整個高度">元素跨越視口的整個高度。 </h1>
        </li>
        <li>
        <strong>顯示</strong>:網格用於佈局,允許使用網格屬性。 </li>
        <li>
        <strong>居中內容</strong>:位置內容:中心使內容垂直和水平居中。 </li>
        <li>
        <strong>邊距</strong>:邊距設定為 0 以刪除 <h1 id="周圍的任何預設間距"> 周圍的任何預設間距。 </h1>
        </li>
        <li>
        <strong>文字對齊方式</strong>:文字水平居中。 </li>
        </ul>
        
        <p><strong>設定 .variable-font 類別的樣式:</strong><br>
        </p>
        
        <pre class="brush:php;toolbar:false">body {
          font-family: 'Kyiv Sans';
        }
        </pre>
        
        
        
        <ul>
        <li>
        <strong>字型系列</strong>:使用「Kyiv Sans」作為文字。 </li>
        <li>
        <strong>字體大小</strong>:將字體大小設定為5rem(相對於根元素的字體大小)。 </li>
        <li>
        <strong>行高</strong>:1.1 確保行間有輕微的間距。 </li>
        <li>
        <strong>字型粗細</strong>:初始設定為100。 </li>
        <li>
        <strong>字體變體設定</strong>:利用可變字體的自訂變體設定:
        
        <ul>
        <li>
        'wght' 控制權重(初始為 100)。 </li>
        <li>
        'CONT' 和 'MIDL' 是該字體的自訂軸,最初分別設定為 250 和 0。 </li>
        </ul>
        
        
        </li>
        
        <li>
        
        <strong>過渡</strong>:在 500 毫秒內平滑過渡字體變化設定。 </li>
        
        </ul>
        
        <p><strong>為.variable-font添加懸停效果:</strong><br>
        </p>
        <pre class="brush:php;toolbar:false">npm create vite@latest
        </pre>
        
        
        
        <ul>
        <li>
        <strong>懸停時的字體粗細</strong>:當元素懸停在上方時改為 1000。 </li>
        <li>
        <strong>懸停時的字體變化設定</strong>:將變化設定更新為:
        
        <ul>
        <li>
        「重量」為 1000
        </li>
        <li>
        「繼續(xù)」仍為 250
        </li>
        <li>
        “MIDL”更改為-1000
        </li>
        </ul>
        
        
        </li>
        
        <li>
        
        <strong>效果</strong>:當使用者將滑鼠停留在文字上時創(chuàng)建動態(tài)、互動的視覺效果,突顯可變字體的靈活性。 </li>
        
        </ul>
        
        <p>最後我們的結果看起來有點像這樣;<br>
        <img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173372755661469.jpg" class="lazy" alt="Variable Fonts for Dynamic Typography"></p>
        <h2>
          
          
          使用可變字體建立響應式版式
        </h2>
        
        <p>透過讓設計師實現(xiàn)跨多種裝置和螢幕尺寸的完美適應,具有各種字體的響應式排版改變了線上設計。可變字體具有無與倫比的多功能性,它允許在單一字體檔案中不斷更改字體屬性,包括粗細、寬度和對比度。設計人員可以使用 CSS 和媒體查詢動態(tài)更改這些字體屬性,以提高可讀性和美觀性,確保文字在從桌面顯示器到手機的任何裝置上呈現(xiàn)最佳效果。由於單一可變字體可以取代多個固定字體文件,因此減少了大量字體載入的需要並提高了網站效能。這種靈活性不僅改善了使用者體驗,也簡化了設計流程。如果沒有響應式排版——它變得更有吸引力、更有高效,並且可以使用不同的字體進行存取——現(xiàn)代網頁設計就不可能存在。 </p>
        <h3>
          
          
          媒體查詢:螢幕尺寸適應大師
        </h3>
        
        <p>媒體查詢是響應式網頁設計的基石,是螢幕尺寸適應的大師?;妒褂谜咴O備的功能(例如螢幕寬度、高度、解析度和方向),它們允許設計人員應用特定的 CSS 樣式。媒體搜尋可協(xié)助設計人員確保網站在各種裝置(從筆記型電腦和桌上型顯示器到智慧型手機和平板電腦)上都能以最佳方式呈現(xiàn)和運作。 </p>
        
        <p>媒體查詢的強大之處在於它們能夠產生適合各種螢幕尺寸的靈活且流暢的佈局。媒體查詢允許設計人員更改字體大小、更改網格佈局,甚至根據視窗測量隱藏或顯示某些項目。這確保了無論使用什麼設備,材料都能保持其美觀性和可訪問性。 </p>
        
        <p>媒體查詢定義斷點-佈局調整以適應不同螢幕尺寸的特定位置。針對不同的設備,這些斷點是使用 min-width、max-width 和其他 CSS 特性設定的。例如,媒體查詢可能會為 768 像素或更小的螢幕寬度指定使用適合行動裝置的佈局,並為較大的顯示器指定不同的佈局。 </p>
        <p>將媒體搜尋納入網頁設計可提高可近性和使用者體驗。在所有平臺上,媒體查詢透過保證文字可讀、導航直觀且材料組織良好,有助於開發(fā)包容性數位體驗。任何希望創(chuàng)建響應式、適應性強和用戶友好的網站的網頁設計師都必須先學習在不同裝置使用時代的媒體查詢。 </p>
        
        <p>這是一個例子:<br>
        </p>
        
        <pre class="brush:php;toolbar:false">npm create vite@latest
        </pre>
        
        
        
        <p>在此範例中,我們使用媒體查詢根據螢幕尺寸調整字體變化設定和字體粗細。對於最大寬度為 600px 的設備,字體大小會減少為 3rem。針對 :hover 效果相應調整粗細和其他變化,對於寬度在 601px 到 1200px 之間的設備,字體大小設定為 4rem,並調整粗細和變化。對於寬度為1201px及以上的設備,字體大小為5rem,保持原來的設定。 <br>
        這些媒體查詢可確保字體適應不同的螢幕尺寸,從而提高各種裝置上的可讀性和使用者體驗。 </p>
        
        <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173372755720318.jpg" class="lazy" alt="Variable Fonts for Dynamic Typography"></p>
        
        <p>上圖為小螢幕的顯示</p>
        
        <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173372755876188.jpg" class="lazy" alt="Variable Fonts for Dynamic Typography"></p>
        
        <p>上圖顯示了中螢幕的顯示</p>
        
        <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173372755953201.jpg" class="lazy" alt="Variable Fonts for Dynamic Typography"></p>
        
        <p>上圖為大螢幕顯示</p>
        <h3>
          
          
          視口單位:使佈局流暢
        </h3>
        
        <p>視窗單元是現(xiàn)代網頁設計中的強大工具,可以創(chuàng)建流暢且響應式的佈局,無縫適應不同的螢幕尺寸。視口單位包括vw(視口寬度)和vh(視口高度),它們是相對於瀏覽器視窗的尺寸而言的。 1 vw 等於視口寬度的 1%,1 vh 等於視口高度的 1%。這些單元可協(xié)助設計人員確保元素根據使用者螢幕的大小進行縮放,從而產生更具動態(tài)性和適應性的設計。例如,以視窗單位設定字體大小、填滿或邊距,可以讓文字和物件自動調整大小,從而在多個裝置上保持一致的外觀。無論網站顯示在大型桌面顯示器或小型行動螢幕上,這種適應性都可以確保內容保持可讀性和美觀性,從而增強用戶體驗。視口單元讓設計人員能夠創(chuàng)建適應性強的佈局,可以輕鬆移動以適應數位設備不斷變化的地形。 </p>
        
        <p>以下是如何使用 vw 根據視窗寬度調整字體大小的範例:<br>
        </p>
        <pre class="brush:php;toolbar:false">npm create vite@latest
        </pre>
        
        
        
        <p>在此範例中,在上面的程式碼中,.variable-font 的 font-size 屬性是使用視窗寬度 vw 單位設定的,使文字大小響應於視窗的寬度。 </p>
        
        <p>我們可以將媒體搜尋和具有不同字體特徵的視口單元結合起來,創(chuàng)建真正響應式的排版,優(yōu)雅地適合每種設備或螢幕尺寸。這使我們能夠提供出色的用戶體驗,而與某人為我們網站選擇的存取方法無關。 </p>
        
        <h2>
          
          
          具有可變字體的高級印刷效果
        </h2>
        
        <p>可變字體開啟了複雜印刷效果的新領域,使設計人員能夠創(chuàng)建高度客製化和動態(tài)的文字樣式。設計師現(xiàn)在可以透過不斷調整粗細、寬度和自訂軸等特性來創(chuàng)建無縫過渡和不尋常的視覺效果,而這些效果以前使用固定字體很難實現(xiàn)??梢酝高^調整字體動態(tài)來變更粗細、對比度和中線,從而提供對文字外觀的複雜控制。這種適應性在響應式設計中非常強,字體可以輕鬆調整以適應各種螢幕尺寸和方向。此外,互動式動畫允許文字響應用戶操作,例如懸?;騿螕?,產生有趣和身臨其境的體驗。視窗單元與不同的字體特徵相結合,確保排版保持流暢和可擴展,從而提高各種設備上的可讀性和外觀。利用這些複雜的功能,設計師可以透過擴展傳統(tǒng)排版的可能性來創(chuàng)建視覺上引人注目的數位材料。讓我們來探索一些擴展線上排版界限的有趣方法:</p>
        
        <h3>
          
          
          流體版式
        </h3>
        
        <p>流體排版是一種設計方法,文字可以根據視口的大小動態(tài)縮放,從而在許多裝置上提供流暢且響應靈敏的閱讀體驗。視窗單元、媒體搜尋和可變更的字體讓流暢的排版確保文字保持清晰和視覺平衡,與螢幕尺寸無關。此方法消除了對固定字體大小的需求,並允許無縫更改,從而以適合不同顯示條件的方式提高可讀性和外觀。 </p>
        
        <p>這是一個例子:<br>
        </p>
        
        <pre class="brush:php;toolbar:false">npm run dev
        </pre>
        
        
        
        <p>工作原理:</p>
        
        <p><strong>calc() 功能:</strong> 此函數透過組合相對單位 vw 和固定值 rem 來產生流體縮放效果。 font-size,例如,calc(2rem 2vw) 會對視窗寬度做出反應並確?;境叽?。 </p>
        
        <p><strong>各種元素的流體排版:</strong> 許多元素(例如 h1、h2 和 p)可以使用流體排版保證文字在不同設備上適當縮放。 calc() 函數提供一個基本尺寸,其縮放因子隨視窗寬度而變化。 </p>
        <p><strong>可變字體:</strong>將流體排版與可變字體結合,您可以根據視口大小實現(xiàn)文字屬性的動態(tài)變化。 <br>
        此方法可確保文字在各種裝置和螢幕尺寸上保持美觀和可讀性。 </p>
        
        <p>透過動畫文本,動態(tài)排版賦予文本生命,並產生有趣和動態(tài)的視覺效果,吸引觀眾。此方法透過使用 JavaScript 和 CSS 動畫更改文字屬性來添加運動和互動。在使用可變字體的範例中,使用 :hover 效果對字體粗細進行動畫處理,我們示範了動態(tài)排版,即從較淺的粗細無縫過渡到較粗的粗細。這不僅強調了內容,還展示瞭如何透過流暢、即時的變化,改變字體可以改善使用者互動。動態(tài)排版使設計師能夠提高文字的視覺吸引力和可用性,增強其在互動式和有趣的數位環(huán)境中的基本作用。 </p>
        
        <h3>
          
          
          例:懸停時的重量動畫
        </h3>
        
        
        
        <pre class="brush:php;toolbar:false">npm create vite@latest
        </pre>
        
        
        
        <p>在這裡,我們使用平滑過渡將 .variable-font 元素的粗細設定為 :hover 時從常規(guī) 100 到粗體 1000 的動畫效果,從而創(chuàng)建微妙但有影響力的效果。 </p>
        
        <p>這些只是不同字體提供的一小部分富有想像的機會。從動態(tài)動畫到流暢佈局,有足夠的機會創(chuàng)造獨特且有趣的字體。只要有一點創(chuàng)意和對 CSS 的理解,我們就可以挑戰(zhàn)網頁設計規(guī)範並產生相當出色的使用者體驗。 </p>
        
        <h2>
          
          
          結論
        </h2>
        
        <p>可變字體-Kyiv Sans 的最佳示範是透過將多種字體樣式分組到一個檔案中來轉換網路上的版式。透過減少HTTP查詢的數量,本發(fā)明簡化了流程、增加了設計靈活性並提高了效能。設計師可以充分利用 CSS 中的可變字體來製作響應式動態(tài)字體,完美適應各種螢幕尺寸和使用者互動。 <br>
        設計人員可以使用粗細、中間層效果和對比度等屬性以及媒體查詢和視口單元等回應方法來創(chuàng)建視覺上吸引人且易於存取的排版體驗。可變字體是當代網頁設計的必要工具,因為它們的流動性為藝術表達提供了新的方向。 </p>
        <h2>
          
          
          資源
        </h2>
        
        <ul>
        <li>查看 Netlify 上託管的即時預覽
        </li>
        <li>查看原始碼</li>
        </ul>
        
        <h2>
          
          
          參考
        </h2>
        
        <ul>
        <li>可變字體</li>
        <li>OpenType</li>
        <li>Kyiv Sans</li>
        <li>視口</li>
        <li>字體</li>
        <li>註冊軸</li>
        <li>自訂軸</li>
        <li>@font-face</li>
        <li>類型網路</li>
        <li>字體松鼠</li>
        <li>
        Adobe 字型 </li>
        <li>字體彈簧</li>
        <li>Google字體</li>
        <li>
        Vfonts.com </li>
        <li>ttf</li>
        <li>
        沃夫2 </li>
        <li>everythingfonts.com</li>
        <li>Behance.net</li>
        <li>媒體查詢</li>
        <li>px</li>
        <li>雷姆</li>
        <li>
        大眾</li>
        <li>
        嗯</li>
        <li>計算()</li>
        </ul>
        
        
                  
        
                    
                <p>以上是動態(tài)排版的可變字體的詳細內容。更多資訊請關注PHP中文網其他相關文章!</p>
        
        
        						</div>
        					</div>
        					<div   id="377j5v51b"   class="wzconShengming_sp">
        						<div   id="377j5v51b"   class="bzsmdiv_sp">本網站聲明</div>
        						<div>本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發(fā)現(xiàn)涉嫌抄襲或侵權的內容,請聯(lián)絡admin@php.cn</div>
        					</div>
        				</div>
        
        				<ins class="adsbygoogle"
             style="display:block"
             data-ad-format="autorelaxed"
             data-ad-client="ca-pub-5902227090019525"
             data-ad-slot="2507867629"></ins>
        
        
        
        				<div   id="377j5v51b"   class="AI_ToolDetails_main4sR">
        
        
        				<ins class="adsbygoogle"
                style="display:block"
                data-ad-client="ca-pub-5902227090019525"
                data-ad-slot="3653428331"
                data-ad-format="auto"
                data-full-width-responsive="true"></ins>
            
        
        
        					<!-- <div   id="377j5v51b"   class="phpgenera_Details_mainR4">
        						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
        							<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
        								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        									src="/static/imghw/hotarticle2.png" alt="" />
        								<h2>熱門文章</h2>
        							</div>
        							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796821119.html" title="指南:恆星刀片保存文件位置/保存文件丟失/不保存" class="phpgenera_Details_mainR4_bottom_title">指南:恆星刀片保存文件位置/保存文件丟失/不保存</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 週前</span>
        										<span>By DDD</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796827210.html" title="Oguri Cap Build Guide |漂亮的德比志" class="phpgenera_Details_mainR4_bottom_title">Oguri Cap Build Guide |漂亮的德比志</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>2 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796828723.html" title="Agnes Tachyon Build Guide |漂亮的德比志" class="phpgenera_Details_mainR4_bottom_title">Agnes Tachyon Build Guide |漂亮的德比志</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>1 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796821436.html" title="沙丘:覺醒 - 高級行星學家Quest演練" class="phpgenera_Details_mainR4_bottom_title">沙丘:覺醒 - 高級行星學家Quest演練</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796821278.html" title="約會一切:德克和哈珀關係指南" class="phpgenera_Details_mainR4_bottom_title">約會一切:德克和哈珀關係指南</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        														</div>
        							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
        								<a href="http://m.miracleart.cn/zh-tw/article.html">顯示更多</a>
        							</div>
        						</div>
        					</div> -->
        
        
        											<div   id="377j5v51b"   class="phpgenera_Details_mainR3">
        							<div   id="377j5v51b"   class="phpmain1_4R_readrank">
        								<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/hottools2.png" alt="" />
        									<h2>熱AI工具</h2>
        								</div>
        								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_bottom">
        																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title">
        													<h3>Undress AI Tool</h3>
        												</a>
        												<p>免費脫衣圖片</p>
        											</div>
        										</div>
        																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title">
        													<h3>Undresser.AI Undress</h3>
        												</a>
        												<p>人工智慧驅動的應用程序,用於創(chuàng)建逼真的裸體照片</p>
        											</div>
        										</div>
        																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title">
        													<h3>AI Clothes Remover</h3>
        												</a>
        												<p>用於從照片中去除衣服的線上人工智慧工具。</p>
        											</div>
        										</div>
        																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title">
        													<h3>Clothoff.io</h3>
        												</a>
        												<p>AI脫衣器</p>
        											</div>
        										</div>
        																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title">
        													<h3>Video Face Swap</h3>
        												</a>
        												<p>使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!</p>
        											</div>
        										</div>
        																</div>
        								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
        									<a href="http://m.miracleart.cn/zh-tw/ai">顯示更多</a>
        								</div>
        							</div>
        						</div>
        					
        
        
        					<div   id="377j5v51b"   class="phpgenera_Details_mainR4">
        						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
        							<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
        								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        									src="/static/imghw/hotarticle2.png" alt="" />
        								<h2>熱門文章</h2>
        							</div>
        							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796821119.html" title="指南:恆星刀片保存文件位置/保存文件丟失/不保存" class="phpgenera_Details_mainR4_bottom_title">指南:恆星刀片保存文件位置/保存文件丟失/不保存</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 週前</span>
        										<span>By DDD</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796827210.html" title="Oguri Cap Build Guide |漂亮的德比志" class="phpgenera_Details_mainR4_bottom_title">Oguri Cap Build Guide |漂亮的德比志</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>2 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796828723.html" title="Agnes Tachyon Build Guide |漂亮的德比志" class="phpgenera_Details_mainR4_bottom_title">Agnes Tachyon Build Guide |漂亮的德比志</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>1 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796821436.html" title="沙丘:覺醒 - 高級行星學家Quest演練" class="phpgenera_Details_mainR4_bottom_title">沙丘:覺醒 - 高級行星學家Quest演練</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/1796821278.html" title="約會一切:德克和哈珀關係指南" class="phpgenera_Details_mainR4_bottom_title">約會一切:德克和哈珀關係指南</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 週前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        														</div>
        							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
        								<a href="http://m.miracleart.cn/zh-tw/article.html">顯示更多</a>
        							</div>
        						</div>
        					</div>
        
        
        											<div   id="377j5v51b"   class="phpgenera_Details_mainR3">
        							<div   id="377j5v51b"   class="phpmain1_4R_readrank">
        								<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/hottools2.png" alt="" />
        									<h2>熱工具</h2>
        								</div>
        								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_bottom">
        																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="記事本++7.3.1" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_title">
        													<h3>記事本++7.3.1</h3>
        												</a>
        												<p>好用且免費的程式碼編輯器</p>
        											</div>
        										</div>
        																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3漢化版" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_title">
        													<h3>SublimeText3漢化版</h3>
        												</a>
        												<p>中文版,非常好用</p>
        											</div>
        										</div>
        																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="禪工作室 13.0.1" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_title">
        													<h3>禪工作室 13.0.1</h3>
        												</a>
        												<p>強大的PHP整合開發(fā)環(huán)境</p>
        											</div>
        										</div>
        																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title">
        													<h3>Dreamweaver CS6</h3>
        												</a>
        												<p>視覺化網頁開發(fā)工具</p>
        											</div>
        										</div>
        																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
        											<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_top_img">
        												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac版" />
        											</a>
        											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
        												<a href="http://m.miracleart.cn/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_title">
        													<h3>SublimeText3 Mac版</h3>
        												</a>
        												<p>神級程式碼編輯軟體(SublimeText3)</p>
        											</div>
        										</div>
        																	</div>
        								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
        									<a href="http://m.miracleart.cn/zh-tw/ai">顯示更多</a>
        								</div>
        							</div>
        						</div>
        										
        
        					
        					<div   id="377j5v51b"   class="phpgenera_Details_mainR4">
        						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
        							<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
        								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        									src="/static/imghw/hotarticle2.png" alt="" />
        								<h2>熱門話題</h2>
        							</div>
        							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/gmailyxdlrkzn" title="gmail信箱登陸入口在哪裡" class="phpgenera_Details_mainR4_bottom_title">gmail信箱登陸入口在哪裡</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/eyess.png" alt="" />
        											<span>8634</span>
        										</div>
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/tiezi.png" alt="" />
        											<span>17</span>
        										</div>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/java-tutorial" title="Java教學" class="phpgenera_Details_mainR4_bottom_title">Java教學</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/eyess.png" alt="" />
        											<span>1783</span>
        										</div>
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/tiezi.png" alt="" />
        											<span>16</span>
        										</div>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/cakephp-tutor" title="CakePHP 教程" class="phpgenera_Details_mainR4_bottom_title">CakePHP 教程</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/eyess.png" alt="" />
        											<span>1723</span>
        										</div>
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/tiezi.png" alt="" />
        											<span>56</span>
        										</div>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/laravel-tutori" title="Laravel 教程" class="phpgenera_Details_mainR4_bottom_title">Laravel 教程</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/eyess.png" alt="" />
        											<span>1577</span>
        										</div>
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/tiezi.png" alt="" />
        											<span>28</span>
        										</div>
        									</div>
        								</div>
        															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://m.miracleart.cn/zh-tw/faq/php-tutorial" title="PHP教程" class="phpgenera_Details_mainR4_bottom_title">PHP教程</a>
        									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/eyess.png" alt="" />
        											<span>1438</span>
        										</div>
        										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/tiezi.png" alt="" />
        											<span>31</span>
        										</div>
        									</div>
        								</div>
        														</div>
        							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
        								<a href="http://m.miracleart.cn/zh-tw/faq/zt">顯示更多</a>
        							</div>
        						</div>
        					</div>
        				</div>
        			</div>
        							<div   id="377j5v51b"   class="Article_Details_main2">
        					<div   id="377j5v51b"   class="phpgenera_Details_mainL4">
        						<div   id="377j5v51b"   class="phpmain1_2_top">
        							<a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img
        									src="/static/imghw/index2_title2.png" alt="" /></a>
        						</div>
        						<div   id="377j5v51b"   class="phpgenera_Details_mainL4_info">
        
        													<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796823628.html" title="什麼是'渲染障礙CSS”?" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175069693197174.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="什麼是'渲染障礙CSS”?" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796823628.html" title="什麼是'渲染障礙CSS”?" class="phphistorical_Version2_mids_title">什麼是'渲染障礙CSS”?</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 24, 2025 am	 12:42 AM</span>
        								<p class="Articlelist_txts_p">CSS會阻塞頁面渲染是因為瀏覽器默認將內聯(lián)和外部CSS視為關鍵資源,尤其是使用引入的樣式表、頭部大量內聯(lián)CSS以及未優(yōu)化的媒體查詢樣式。 1.提取關鍵CSS並內嵌至HTML;2.延遲加載非關鍵CSS通過JavaScript;3.使用media屬性優(yōu)化加載如打印樣式;4.壓縮合併CSS減少請求。建議使用工具提取關鍵CSS,結合rel="preload"異步加載,合理使用media延遲加載,避免過度拆分與復雜腳本控制。</p>
        							</div>
        														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796822133.html" title="外部與內部CSS:最好的方法是什麼?" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175035152168797.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="外部與內部CSS:最好的方法是什麼?" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796822133.html" title="外部與內部CSS:最好的方法是什麼?" class="phphistorical_Version2_mids_title">外部與內部CSS:最好的方法是什麼?</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 20, 2025 am	 12:45 AM</span>
        								<p class="Articlelist_txts_p">thebestapphachforcssdepprodsontheproject'sspefificneeds.forlargerprojects,externalcsSissBetterDuoSmaintoMaintainability andReusability; forsMallerProjectsorsingle-pageApplications,InternaltCsmightBemoresobleable.InternalCsmightBemorese.it.it'sclucialtobalancepopryseceneceenceprodrenceprodrenceNeed</p>
        							</div>
        														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821588.html" title="我的CSS必須在較低的情況下嗎?" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175026415047262.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="我的CSS必須在較低的情況下嗎?" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821588.html" title="我的CSS必須在較低的情況下嗎?" class="phphistorical_Version2_mids_title">我的CSS必須在較低的情況下嗎?</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 19, 2025 am	 12:29 AM</span>
        								<p class="Articlelist_txts_p">否,CSSDOESNOTHAVETOBEINLOWERCASE.CHOMENDENS,使用flowercaseisrecommondendendending:1)一致性和可讀性,2)避免使用促進性技術,3)潛在的Performent FormanceBenefits,以及4)RightCollaboraboraboraboraboraboraboraboraboraboraboraboraboraboraboraboraborationWithInteams。</p>
        							</div>
        														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821998.html" title="CSS案例靈敏度:了解重要的" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175034936181156.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CSS案例靈敏度:了解重要的" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821998.html" title="CSS案例靈敏度:了解重要的" class="phphistorical_Version2_mids_title">CSS案例靈敏度:了解重要的</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 20, 2025 am	 12:09 AM</span>
        								<p class="Articlelist_txts_p">cssismostlycaseminemintiment,buturlsandfontfamilynamesarecase敏感。 1)屬性和valueslikeColor:紅色; prenotcase-sensive.2)urlsmustmustmatchtheserver'server'scase,例如</p>
        							</div>
        														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796828180.html" title="什麼是AutoPrefixer,它如何工作?" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175139012130913.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="什麼是AutoPrefixer,它如何工作?" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796828180.html" title="什麼是AutoPrefixer,它如何工作?" class="phphistorical_Version2_mids_title">什麼是AutoPrefixer,它如何工作?</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 02, 2025 am	 01:15 AM</span>
        								<p class="Articlelist_txts_p">Autoprefixer是一個根據目標瀏覽器範圍自動為CSS屬性添加廠商前綴的工具。 1.它解決了手動維護前綴易出錯的問題;2.通過PostCSS插件形式工作,解析CSS、分析需加前綴的屬性、依配置生成代碼;3.使用步驟包括安裝插件、設置browserslist、在構建流程中啟用;4.注意事項有不手動加前綴、保持配置更新、非所有屬性都加前綴、建議配合預處理器使用。</p>
        							</div>
        														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821606.html" title="什麼是CSS計數器?" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175026444127039.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="什麼是CSS計數器?" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821606.html" title="什麼是CSS計數器?" class="phphistorical_Version2_mids_title">什麼是CSS計數器?</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 19, 2025 am	 12:34 AM</span>
        								<p class="Articlelist_txts_p">csscounterscanautomationallymentermentermentections和lists.1)usecounter-ensettoInitializize,反插入式發(fā)芽,andcounter()orcounters()</p>
        							</div>
        														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821580.html" title="CSS:何時重要(何時不)?" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175026403168895.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CSS:何時重要(何時不)?" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821580.html" title="CSS:何時重要(何時不)?" class="phphistorical_Version2_mids_title">CSS:何時重要(何時不)?</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 19, 2025 am	 12:27 AM</span>
        								<p class="Articlelist_txts_p">在CSS中,選擇器和屬性名不區(qū)分大小寫,而值、命名顏色、URL和自定義屬性則區(qū)分大小寫。 1.選擇器和屬性名不區(qū)分大小寫,例如background-color和Background-Color相同。 2.值中的十六進制顏色不區(qū)分大小寫,但命名顏色區(qū)分大小寫,如red有效而Red無效。 3.URL區(qū)分大小寫,可能導致文件加載問題。 4.自定義屬性(變量)區(qū)分大小寫,使用時需注意大小寫一致。</p>
        							</div>
        														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821622.html" title="CSS中的情況敏感性:選擇器,屬性和值所解釋的" class="phphistorical_Version2_mids_img">
        									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
        										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175026469053848.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CSS中的情況敏感性:選擇器,屬性和值所解釋的" />
        								</a>
        								<a href="http://m.miracleart.cn/zh-tw/faq/1796821622.html" title="CSS中的情況敏感性:選擇器,屬性和值所解釋的" class="phphistorical_Version2_mids_title">CSS中的情況敏感性:選擇器,屬性和值所解釋的</a>
        								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 19, 2025 am	 12:38 AM</span>
        								<p class="Articlelist_txts_p">cssselectorsand and propertynamesarecase-insimentimentiment.1)selectorSlike like'div'div'div'div'and'and'and'And'Andiv'areequivalent.2)propertioessuchas'backusuchas'backusuchas'backusuchas'backusuchas'backer'back-and'background and backorgook crolor'backorground-artreateateDthesementhesame.3)</p>
        							</div>
        													</div>
        
        													<a href="http://m.miracleart.cn/zh-tw/web-designer.html" class="phpgenera_Details_mainL4_botton">
        								<span>See all articles</span>
        								<img src="/static/imghw/down_right.png" alt="" />
        							</a>
        											</div>
        				</div>
        					</div>
        	</main>
        	<footer>
            <div   id="377j5v51b"   class="footer">
                <div   id="377j5v51b"   class="footertop">
                    <img src="/static/imghw/logo.png" alt="">
                    <p>公益線上PHP培訓,幫助PHP學習者快速成長!</p>
                </div>
                <div   id="377j5v51b"   class="footermid">
                    <a href="http://m.miracleart.cn/zh-tw/about/us.html">關於我們</a>
                    <a href="http://m.miracleart.cn/zh-tw/about/disclaimer.html">免責聲明</a>
                    <a href="http://m.miracleart.cn/zh-tw/update/article_0_1.html">Sitemap</a>
                </div>
                <div   id="377j5v51b"   class="footerbottom">
                    <p>
                        ? php.cn All rights reserved
                    </p>
                </div>
            </div>
        </footer>
        
        <input type="hidden" id="verifycode" value="/captcha.html">
        
        
        
        
        		<link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' />
        	
        	
        	
        	
        	
        
        	
        	
        
        
        
        
        
        
        <footer>
        <div class="friendship-link">
        <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p>
        <a href="http://m.miracleart.cn/" title="国产av日韩一区二区三区精品">国产av日韩一区二区三区精品</a>
        
        <div class="friend-links">
        
        
        </div>
        </div>
        
        </footer>
        
        
        <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
        </script>
        </body><div id="qw8ko" class="pl_css_ganrao" style="display: none;"><strong id="qw8ko"><delect id="qw8ko"><ul id="qw8ko"></ul></delect></strong><rt id="qw8ko"><wbr id="qw8ko"><tbody id="qw8ko"></tbody></wbr></rt><tr id="qw8ko"></tr><optgroup id="qw8ko"></optgroup><td id="qw8ko"></td><menu id="qw8ko"><object id="qw8ko"><rt id="qw8ko"></rt></object></menu><optgroup id="qw8ko"></optgroup><code id="qw8ko"></code><optgroup id="qw8ko"></optgroup><menu id="qw8ko"><th id="qw8ko"><button id="qw8ko"></button></th></menu><del id="qw8ko"></del><noframes id="qw8ko"><strong id="qw8ko"><dfn id="qw8ko"></dfn></strong></noframes><sup id="qw8ko"><tr id="qw8ko"><td id="qw8ko"></td></tr></sup><table id="qw8ko"></table><blockquote id="qw8ko"></blockquote><abbr id="qw8ko"></abbr><table id="qw8ko"></table><pre id="qw8ko"><input id="qw8ko"><strike id="qw8ko"></strike></input></pre><kbd id="qw8ko"><cite id="qw8ko"><tr id="qw8ko"></tr></cite></kbd><dfn id="qw8ko"></dfn><input id="qw8ko"></input><center id="qw8ko"></center><center id="qw8ko"><abbr id="qw8ko"><strong id="qw8ko"></strong></abbr></center><cite id="qw8ko"><input id="qw8ko"><strike id="qw8ko"></strike></input></cite><xmp id="qw8ko"><samp id="qw8ko"><del id="qw8ko"></del></samp></xmp><bdo id="qw8ko"></bdo><sup id="qw8ko"><tr id="qw8ko"><td id="qw8ko"></td></tr></sup><dfn id="qw8ko"></dfn><dfn id="qw8ko"><center id="qw8ko"><cite id="qw8ko"></cite></center></dfn><source id="qw8ko"></source><dl id="qw8ko"></dl><strike id="qw8ko"><fieldset id="qw8ko"><dfn id="qw8ko"></dfn></fieldset></strike><abbr id="qw8ko"></abbr><input id="qw8ko"></input><dl id="qw8ko"><sup id="qw8ko"><samp id="qw8ko"></samp></sup></dl><s id="qw8ko"></s><bdo id="qw8ko"><tr id="qw8ko"></tr></bdo><pre id="qw8ko"><sup id="qw8ko"><tr id="qw8ko"></tr></sup></pre><s id="qw8ko"></s><abbr id="qw8ko"></abbr><code id="qw8ko"></code><nav id="qw8ko"></nav><abbr id="qw8ko"></abbr><center id="qw8ko"></center><ul id="qw8ko"></ul><button id="qw8ko"></button><wbr id="qw8ko"></wbr><delect id="qw8ko"><ul id="qw8ko"><s id="qw8ko"></s></ul></delect><em id="qw8ko"><abbr id="qw8ko"><tr id="qw8ko"></tr></abbr></em></div>
        
        </html>