• <sup id="a02ie"><samp id="a02ie"></samp></sup><\/code>內(nèi)渲染。此標簽作為集成點,用于包含Rails動態(tài)渲染的視圖內(nèi)容;<\/li>\n<\/ul>\n<\/details>\n

    使用pages<\/code>控制器和html_test_1<\/code>、html_test_2<\/code>、html_test_3<\/code>和html_test_4<\/code>操作生成測試頁面<\/h3>\n
    展開…<\/summary> \n```bash\n$ rails g controller pages html_test_1 html_test_2 html_test_3 html_test_4\n create app\/controllers\/pages_controller.rb\n route get \"pages\/html_test_1\"\n get \"pages\/html_test_2\"\n get \"pages\/html_test_3\"\n get \"pages\/html_test_4\"\n invoke erb\n create app\/views\/pages\n create app\/views\/pages\/html_test_1.html.erb\n create app\/views\/pages\/html_test_2.html.erb\n create app\/views\/pages\/html_test_3.html.erb\n create app\/views\/pages\/html_test_4.html.erb\n invoke helper\n create app\/helpers\/pages_helper.rb\n```\n
      \n
    • 由于在創(chuàng)建控制器和操作時也添加了路由,因此可以通過以下鏈接訪問任何創(chuàng)建的操作:<\/li>\n
    • localhost:3000\/pages\/html_test_1<\/code><\/li>\n
    • localhost:3000\/pages\/html_test_2<\/code><\/li>\n
    • localhost:3000\/pages\/html_test_3<\/code><\/li>\n
    • localhost:3000\/pages\/html_test_4<\/code><\/li>\n<\/ul>\n

      使用VSCode打開config\/routes.rb<\/code>文件<\/h3>\n
        \n
      • 在文件末尾添加以下行,將頁面根目錄定向到之前創(chuàng)建的pages<\/code>控制器和html_test_1<\/code>操作。這樣,訪問您的網(wǎng)站或系統(tǒng)時,首先顯示的頁面將是pages<\/code>控制器的html_test_1<\/code>頁面。否則,將顯示Rails的默認頁面。<\/li>\n<\/ul>\n
        \n    <\/title><meta content=\"width=device-width,initial-scale=1\" name=\"viewport\"><\/meta><meta content=\"yes\" name=\"apple-mobile-web-app-capable\"><\/meta><meta content=\"yes\" name=\"mobile-web-app-capable\"><\/meta><link href=\"\/icon.png\" rel=\"icon\" type=\"image\/png\"><\/link><link href=\"\/icon.svg\" rel=\"icon\" type=\"image\/svg+xml\"><\/link><link href=\"\/icon.png\" rel=\"apple-touch-icon\"><\/link><\/pre>\n<ul>\n<li>如果在創(chuàng)建控制器時傳遞了<code>--skip-routes<\/code>參數(shù),則可以忽略為創(chuàng)建的操作添加路由。完整的命令將變?yōu)?code>rails g controller pages html_test_1 html_test_2 html_test_3 html_test_4 --skip-routes<\/code><\/li>\n<\/ul>\n<\/details>\n<h3>顯示Rails路由<\/h3>\n<details><summary>展開…<\/summary>使用終端,您可以指定控制器(使用`-c`)來顯示路由,例如`pages`控制器:\n<pre><code>$ rails -v\nRails 8.0.0\n\n$ time rails new classless-css-tailwind\n...\nreal    0m47.500s\nuser    0m33.052s\nsys     0m4.249s<\/code><\/pre>\n<p>或者,您可以使用以下命令顯示所有路由:<\/p>\n<pre><code>$ cd classless-css-tailwind && code .<\/code><\/pre>\n<ul>\n<li>您還可以使用地址<code>http:\/\/127.0.0.1:3000\/rails\/info\/routes<\/code>通過瀏覽器訪問路由。請勿忘記使用項目根目錄中的<code>bin\/dev<\/code>或標準<code>rails server<\/code>啟動開發(fā)服務(wù)器。開發(fā)服務(wù)器會“監(jiān)聽”JavaScript文件和CSS文件的更改,以執(zhí)行必要的處理以將其提供給用戶。<\/li>\n<li>為了使這些文件的更改能夠立即在瀏覽器中執(zhí)行和查看,需要安裝像Rails Live Reload這樣的gem。<\/li>\n<\/ul>\n<\/details>\n<h3>我們將創(chuàng)建四個包含HTML內(nèi)容的頁面來測試CSS樣式。<\/h3>\n<p>Ruby on Rails默認使用MVC(模型-視圖-控制器)架構(gòu)來啟動項目的組織。大部分代碼都組織在以下文件夾中:<\/p><ul>\n<li>與領(lǐng)域\/業(yè)務(wù)邏輯和數(shù)據(jù)相關(guān)的代碼應(yīng)保存在<code>app\/models<\/code>文件夾中;<\/li>\n<li>與顯示相關(guān)的代碼(HTML、JSON、XML等)將位于<code>app\/views<\/code>文件夾中;<\/li>\n<li>與請求生命周期相關(guān)的代碼將位于<code>app\/controllers<\/code>文件夾中;<\/li>\n<\/ul>\n<h3>插入<code>html_test_1<\/code>頁面的內(nèi)容<\/h3>\n<details><summary>展開…<\/summary>- 訪問鏈接https:\/\/github.com\/dbohdan\/classless-css\/blob\/master\/screenshot-page.html并復(fù)制`<main>`標簽內(nèi)的所有內(nèi)容,如下所示\n<pre><code>$ rails -v\nRails 8.0.0\n\n$ time rails new classless-css-tailwind\n...\nreal    0m47.500s\nuser    0m33.052s\nsys     0m4.249s<\/code><\/pre>\n<\/details>\n<h3>插入<code>html_test_2<\/code>頁面的內(nèi)容<\/h3>\n<details><summary>展開…<\/summary>- 訪問鏈接https:\/\/gist.github.com\/tommaitland\/5865229并復(fù)制`<form>`標簽內(nèi)的所有內(nèi)容,如下所示\n<pre><code>$ cd classless-css-tailwind && code .<\/code><\/pre>\n<legend>A Sample Form Legend<\/legend> <label for=\"name\">Name: <\/label> <label for=\"email\">Email: <\/label> <label>Button: <\/label> <label>Single Checkbox: <\/label> <fieldset><legend>Group of Checkboxes: <\/legend> <label>Checkbox 1: <\/label> <label>Checkbox 2: <\/label> <label>Checkbox 3: <\/label> <label>Checkbox 4: <\/label> <\/fieldset><label>Color: <\/label> <label>Date: <\/label> <label>Date, Time (Local): <\/label> <label>File: <\/label> <label>Image: <\/label> <label>Month: <\/label> <label>Number: <\/label> <label>Password: <\/label> <label>Single Radio: <\/label> <fieldset><legend>Group of Radios: <\/legend> <label>Radio 1: <\/label> <label>Radio 2: <\/label> <label>Radio 3: <\/label> <label>Radio 4: <\/label> <\/fieldset><label>Range: <\/label> <label>Reset: <\/label> <label>Time: <\/label> <label>Search: <\/label> <label>Tel: <\/label> <label>Text: <\/label> <label>URL: <\/label> <label>Week: <\/label> This is a button! <label>Select 1: <\/label> TestTest<label>Select 2: <\/label> TestTest<label>Select Multiple: <\/label> TestTest<label>Select Groups: <\/label> <optgroup label=\"First Group\">TestTest<\/optgroup><optgroup label=\"Second Group\">TestTest<\/optgroup><optgroup label=\"Third Group\">TestTest<\/optgroup><fieldset><legend>Datalist: <\/legend> <datalist>- 打開`app\/views\/pages\/html_test_2.html.erb`文件并粘貼上面復(fù)制的內(nèi)容\n<\/datalist><\/fieldset><\/details>\n<h3>插入<code>html_test_3<\/code>頁面的內(nèi)容<\/h3>\n<details><summary>展開…<\/summary>訪問鏈接https:\/\/github.com\/cbracco\/html5-test-page\/blob\/master\/index.html并復(fù)制`<div>`標簽后的所有內(nèi)容,其中包含文本`<div>`\n<pre class='brush:php;toolbar:false;'>\n    <title><\/title><meta content=\"width=device-width,initial-scale=1\" name=\"viewport\"><\/meta><meta content=\"yes\" name=\"apple-mobile-web-app-capable\"><\/meta><meta content=\"yes\" name=\"mobile-web-app-capable\"><\/meta><link href=\"\/icon.png\" rel=\"icon\" type=\"image\/png\"><\/link><link href=\"\/icon.svg\" rel=\"icon\" type=\"image\/svg+xml\"><\/link><link href=\"\/icon.png\" rel=\"apple-touch-icon\"><\/link><\/pre><\/details>"}	</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">
        <h1><a href="http://ipnx.cn/">亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱</a></h1>
        	<link rel="stylesheet" type="text/css" href="/static/csshw/stylehw.css">
        <header>
            <div   id="wjcelcm34c"   class="head">
                <div   id="wjcelcm34c"   class="haed_left">
                    <div   id="wjcelcm34c"   class="haed_logo">
                        <a href="http://ipnx.cn/zh/" title="" class="haed_logo_a">
                            <img src="/static/imghw/logo.png" alt="" class="haed_logoimg">
                        </a>
                    </div>
                    <div   id="wjcelcm34c"   class="head_nav">
                        <div   id="wjcelcm34c"   class="head_navs">
                            <a href="javascript:;" title="社區(qū)" class="head_nava head_nava-template1">社區(qū)</a>
                            <div   class="wjcelcm34c"   id="dropdown-template1" style="display: none;">
                                <div   id="wjcelcm34c"   class="languagechoose">
                                    <a href="http://ipnx.cn/zh/article.html" title="文章" class="languagechoosea on">文章</a>
                                    <a href="http://ipnx.cn/zh/faq/zt" title="合集" class="languagechoosea">合集</a>
                                    <a href="http://ipnx.cn/zh/wenda.html" title="問答" class="languagechoosea">問答</a>
                                </div>
                            </div>
                        </div>
        
                        <div   id="wjcelcm34c"   class="head_navs">
                            <a href="javascript:;" title="學習" class="head_nava head_nava-template1_1">學習</a>
                            <div   class="wjcelcm34c"   id="dropdown-template1_1" style="display: none;">
                                <div   id="wjcelcm34c"   class="languagechoose">
                                    <a href="http://ipnx.cn/zh/course.html" title="課程" class="languagechoosea on">課程</a>
                                    <a href="http://ipnx.cn/zh/dic/" title="編程詞典" class="languagechoosea">編程詞典</a>
                                </div>
                            </div>
                        </div>
        
                        <div   id="wjcelcm34c"   class="head_navs">
                            <a href="javascript:;" title="工具庫" class="head_nava head_nava-template1_2">工具庫</a>
                            <div   class="wjcelcm34c"   id="dropdown-template1_2" style="display: none;">
                                <div   id="wjcelcm34c"   class="languagechoose">
                                    <a href="http://ipnx.cn/zh/toolset/development-tools" title="開發(fā)工具" class="languagechoosea on">開發(fā)工具</a>
                                    <a href="http://ipnx.cn/zh/toolset/website-source-code" title="網(wǎng)站源碼" class="languagechoosea">網(wǎng)站源碼</a>
                                    <a href="http://ipnx.cn/zh/toolset/php-libraries" title="PHP 庫" class="languagechoosea">PHP 庫</a>
                                    <a href="http://ipnx.cn/zh/toolset/js-special-effects" title="JS特效" class="languagechoosea on">JS特效</a>
                                    <a href="http://ipnx.cn/zh/toolset/website-materials" title="網(wǎng)站素材" class="languagechoosea on">網(wǎng)站素材</a>
                                    <a href="http://ipnx.cn/zh/toolset/extension-plug-ins" title="擴展插件" class="languagechoosea on">擴展插件</a>
                                </div>
                            </div>
                        </div>
        
                        <div   id="wjcelcm34c"   class="head_navs">
                            <a href="http://ipnx.cn/zh/ai" title="AI工具" class="head_nava head_nava-template1_3">AI工具</a>
                        </div>
        
                        <div   id="wjcelcm34c"   class="head_navs">
                            <a href="javascript:;" title="休閑" class="head_nava head_nava-template1_3">休閑</a>
                            <div   class="wjcelcm34c"   id="dropdown-template1_3" style="display: none;">
                                <div   id="wjcelcm34c"   class="languagechoose">
                                    <a href="http://ipnx.cn/zh/game" title="游戲下載" class="languagechoosea on">游戲下載</a>
                                    <a href="http://ipnx.cn/zh/mobile-game-tutorial/" title="游戲教程" class="languagechoosea">游戲教程</a>
        
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                            <div   id="wjcelcm34c"   class="head_search">
                        <input id="key_words"  onkeydown="if (event.keyCode == 13) searchs('zh')" class="search-input" type="text" autocomplete="off" name="keywords" required="required" placeholder="Block,address,transaction,news" value="">
                        <a href="javascript:;" title="搜索"  onclick="searchs('zh')"><img src="/static/imghw/find.png" alt="搜索"></a>
                    </div>
                        <div   id="wjcelcm34c"   class="head_right">
                    <div   id="wjcelcm34c"   class="haed_language">
                        <a href="javascript:;" class="layui-btn haed_language_btn">簡體中文<i class="layui-icon layui-icon-triangle-d"></i></a>
                        <div   class="wjcelcm34c"   id="dropdown-template" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                                        <a href="javascript:;" title="簡體中文" class="languagechoosea">簡體中文</a>
                                                        <a href="javascript:setlang('en');" title="English" class="languagechoosea">English</a>
                                                        <a href="javascript:setlang('zh-tw');" 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="wjcelcm34c"    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="wjcelcm34c"   class="Article_Details_main">
        			<div   id="wjcelcm34c"   class="Article_Details_main1">
        							<div   id="wjcelcm34c"   class="Article_Details_main1L">
        					<div   id="wjcelcm34c"   class="Article_Details_main1Lmain" id="Article_Details_main1Lmain">
        						<div   id="wjcelcm34c"   class="Article_Details_main1L1">目錄</div>
        						<div   id="wjcelcm34c"   class="Article_Details_main1L2" id="Article_Details_main1L2">
        							<!-- 左側(cè)懸浮,文章定位標題1 id="Article_Details_main1L2s_1"-->
        															<div   id="wjcelcm34c"   class="Article_Details_main1L2s ">
        									<a href="#創(chuàng)建新的Rails應(yīng)用" title="創(chuàng)建新的Rails應(yīng)用" >創(chuàng)建新的Rails應(yīng)用</a>
        								</div>
        																<div   id="wjcelcm34c"   class="Article_Details_main1L2s ">
        									<a href="#使用VSCode或您喜歡的編輯器打開項目" title="使用VSCode或您喜歡的編輯器打開項目" >使用VSCode或您喜歡的編輯器打開項目</a>
        								</div>
        																<div   id="wjcelcm34c"   class="Article_Details_main1L2s ">
        									<a href="#使用-code-pages-code-控制器和-code-html-test-code-code-html-test-code-code-html-test-code-和-code-html-test-code-操作生成測試頁面" title="使用<code>pages</code>控制器和<code>html_test_1</code>、<code>html_test_2</code>、<code>html_test_3</code>和<code>html_test_4</code>操作生成測試頁面" >使用<code>pages</code>控制器和<code>html_test_1</code>、<code>html_test_2</code>、<code>html_test_3</code>和<code>html_test_4</code>操作生成測試頁面</a>
        								</div>
        																<div   id="wjcelcm34c"   class="Article_Details_main1L2s ">
        									<a href="#使用VSCode打開-code-config-routes-rb-code-文件" title="使用VSCode打開<code>config/routes.rb</code>文件" >使用VSCode打開<code>config/routes.rb</code>文件</a>
        								</div>
        																<div   id="wjcelcm34c"   class="Article_Details_main1L2s ">
        									<a href="#顯示Rails路由" title="顯示Rails路由" >顯示Rails路由</a>
        								</div>
        																<div   id="wjcelcm34c"   class="Article_Details_main1L2s ">
        									<a href="#我們將創(chuàng)建四個包含HTML內(nèi)容的頁面來測試CSS樣式" title="我們將創(chuàng)建四個包含HTML內(nèi)容的頁面來測試CSS樣式。" >我們將創(chuàng)建四個包含HTML內(nèi)容的頁面來測試CSS樣式。</a>
        								</div>
        																<div   id="wjcelcm34c"   class="Article_Details_main1L2s ">
        									<a href="#插入-code-html-test-code-頁面的內(nèi)容" title="插入<code>html_test_3</code>頁面的內(nèi)容" >插入<code>html_test_3</code>頁面的內(nèi)容</a>
        								</div>
        														</div>
        					</div>
        				</div>
        							<div   id="wjcelcm34c"   class="Article_Details_main1M">
        					<div   id="wjcelcm34c"   class="phpgenera_Details_mainL1">
        						<a href="http://ipnx.cn/zh/" title="首頁"
        							class="phpgenera_Details_mainL1a">首頁</a>
        						<img src="/static/imghw/top_right.png" alt="" />
        												<a href="http://ipnx.cn/zh/web-designer.html"
        							class="phpgenera_Details_mainL1a">web前端</a>
        						<img src="/static/imghw/top_right.png" alt="" />
        												<a href="http://ipnx.cn/zh/css-tutorial.html"
        							class="phpgenera_Details_mainL1a">css教程</a>
        						<img src="/static/imghw/top_right.png" alt="" />
        						<span>使用 Tailwind 作為無類 CSS 框架的快速 Ruby on Rails 前端</span>
        					</div>
        					
        					<div   id="wjcelcm34c"   class="Articlelist_txts">
        						<div   id="wjcelcm34c"   class="Articlelist_txts_info">
        							<h1 class="Articlelist_txts_title">使用 Tailwind 作為無類 CSS 框架的快速 Ruby on Rails 前端</h1>
        							<div   id="wjcelcm34c"   class="Articlelist_txts_info_head">
        								<div   id="wjcelcm34c"   class="author_info">
        									<a href="http://ipnx.cn/zh/member/1468492.html"  class="author_avatar">
        									<img class="lazy"  data-src="https://img.php.cn/upload/avatar/000/000/001/66ea8147b1057383.png" src="/static/imghw/default1.png" alt="Mary-Kate Olsen">
        									</a>
        									<div   id="wjcelcm34c"   class="author_detail">
        																			<a href="http://ipnx.cn/zh/member/1468492.html" class="author_name">Mary-Kate Olsen</a>
                                        										</div>
        								</div>
                        			</div>
        							<span id="wjcelcm34c"    class="Articlelist_txts_time">Jan 15, 2025 am	 10:44 AM</span>
        														
        						</div>
        					</div>
        					<hr />
        					<div   id="wjcelcm34c"   class="article_main php-article">
        						<div   id="wjcelcm34c"   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><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173690908826214.jpg" class="lazy" alt="Ruby on Rails  Frontend Rápido Usando Tailwind como um Frameworks CSS Classless"></p>
        <blockquote>
        <p>本文與本系列之前的文章非常相似,但這次我們將使用Tailwind框架作為無類CSS框架。</p>
        </blockquote>
        <h3 id="創(chuàng)建新的Rails應(yīng)用">創(chuàng)建新的Rails應(yīng)用</h3>
        <ul>
        <li>
        <code>rails serve</code> 命令前的 <code>time</code> 用于顯示命令執(zhí)行的總時間。以下示例耗時47秒。</li>
        </ul>
        <pre class="brush:php;toolbar:false"><code>$ rails -v
        Rails 8.0.0
        
        $ time rails new classless-css-tailwind
        ...
        real    0m47.500s
        user    0m33.052s
        sys     0m4.249s</code></pre>
        <p>Rails 8 基于其“No Build”理念,默認使用Propshaft作為資源管道庫和Importmap作為JavaScript庫。Importmap不執(zhí)行任何JavaScript處理。</p>
        <h3 id="使用VSCode或您喜歡的編輯器打開項目">使用VSCode或您喜歡的編輯器打開項目</h3>
        <pre class="brush:php;toolbar:false"><code>$ rails -v
        Rails 8.0.0
        
        $ time rails new classless-css-tailwind
        ...
        real    0m47.500s
        user    0m33.052s
        sys     0m4.249s</code></pre>
        <h3>了解Rails默認布局 <code>app/views/layouts/application.html.erb</code>
        </h3>
        <details><summary>展開…</summary>- 遵循約定優(yōu)于配置(CoC)原則,Rails使用`application.html.erb`作為默認布局來渲染所有頁面;
        - Rails 8中的原始文件內(nèi)容應(yīng)與以下內(nèi)容相同或相似:
        <pre class="brush:php;toolbar:false"><code>$ cd classless-css-tailwind && code .</code></pre>
        <ul>
        <li>
        <code><head></code> 標簽內(nèi)包含頁面渲染和正常運行的重要結(jié)構(gòu)元素。<code><head></code> 用于包含元數(shù)據(jù)和重要資源,這些資源有助于配置頁面的行為(使用JavaScript)、外觀(使用CSS)、與其他系統(tǒng)和服務(wù)的關(guān)聯(lián)以及安全設(shè)置,例如CSRF和CSP保護;</li>
        <li>頁面的主要內(nèi)容將通過ERB標簽在<code><body></code>內(nèi)渲染。此標簽作為集成點,用于包含Rails動態(tài)渲染的視圖內(nèi)容;</li>
        </ul>
        </details>
        <h3 id="使用-code-pages-code-控制器和-code-html-test-code-code-html-test-code-code-html-test-code-和-code-html-test-code-操作生成測試頁面">使用<code>pages</code>控制器和<code>html_test_1</code>、<code>html_test_2</code>、<code>html_test_3</code>和<code>html_test_4</code>操作生成測試頁面</h3>
        <details><summary>展開…</summary>  
        ```bash
        $ rails g controller pages html_test_1 html_test_2 html_test_3 html_test_4
              create  app/controllers/pages_controller.rb
               route  get "pages/html_test_1"
                      get "pages/html_test_2"
                      get "pages/html_test_3"
                      get "pages/html_test_4"
              invoke  erb
              create    app/views/pages
              create    app/views/pages/html_test_1.html.erb
              create    app/views/pages/html_test_2.html.erb
              create    app/views/pages/html_test_3.html.erb
              create    app/views/pages/html_test_4.html.erb
              invoke  helper
              create    app/helpers/pages_helper.rb
        ```
        <ul>
        <li>由于在創(chuàng)建控制器和操作時也添加了路由,因此可以通過以下鏈接訪問任何創(chuàng)建的操作:</li>
        <li><code>localhost:3000/pages/html_test_1</code></li>
        <li><code>localhost:3000/pages/html_test_2</code></li>
        <li><code>localhost:3000/pages/html_test_3</code></li>
        <li><code>localhost:3000/pages/html_test_4</code></li>
        </ul>
        <h3 id="使用VSCode打開-code-config-routes-rb-code-文件">使用VSCode打開<code>config/routes.rb</code>文件</h3>
        <ul>
        <li>在文件末尾添加以下行,將頁面根目錄定向到之前創(chuàng)建的<code>pages</code>控制器和<code>html_test_1</code>操作。這樣,訪問您的網(wǎng)站或系統(tǒng)時,首先顯示的頁面將是<code>pages</code>控制器的<code>html_test_1</code>頁面。否則,將顯示Rails的默認頁面。</li>
        </ul>
        <pre class='brush:php;toolbar:false;'>
            <title></title><meta content="width=device-width,initial-scale=1" name="viewport"></meta><meta content="yes" name="apple-mobile-web-app-capable"></meta><meta content="yes" name="mobile-web-app-capable"></meta><link href="/icon.png" rel="icon" type="image/png"></link><link href="/icon.svg" rel="icon" type="image/svg+xml"></link><link href="/icon.png" rel="apple-touch-icon"></link></pre>
        <ul>
        <li>如果在創(chuàng)建控制器時傳遞了<code>--skip-routes</code>參數(shù),則可以忽略為創(chuàng)建的操作添加路由。完整的命令將變?yōu)?code>rails g controller pages html_test_1 html_test_2 html_test_3 html_test_4 --skip-routes</code></li>
        </ul>
        </details>
        <h3 id="顯示Rails路由">顯示Rails路由</h3>
        <details><summary>展開…</summary>使用終端,您可以指定控制器(使用`-c`)來顯示路由,例如`pages`控制器:
        <pre class="brush:php;toolbar:false"><code>$ rails -v
        Rails 8.0.0
        
        $ time rails new classless-css-tailwind
        ...
        real    0m47.500s
        user    0m33.052s
        sys     0m4.249s</code></pre>
        <p>或者,您可以使用以下命令顯示所有路由:</p>
        <pre class="brush:php;toolbar:false"><code>$ cd classless-css-tailwind && code .</code></pre>
        <ul>
        <li>您還可以使用地址<code>http://127.0.0.1:3000/rails/info/routes</code>通過瀏覽器訪問路由。請勿忘記使用項目根目錄中的<code>bin/dev</code>或標準<code>rails server</code>啟動開發(fā)服務(wù)器。開發(fā)服務(wù)器會“監(jiān)聽”JavaScript文件和CSS文件的更改,以執(zhí)行必要的處理以將其提供給用戶。</li>
        <li>為了使這些文件的更改能夠立即在瀏覽器中執(zhí)行和查看,需要安裝像Rails Live Reload這樣的gem。</li>
        </ul>
        </details>
        <h3 id="我們將創(chuàng)建四個包含HTML內(nèi)容的頁面來測試CSS樣式">我們將創(chuàng)建四個包含HTML內(nèi)容的頁面來測試CSS樣式。</h3>
        <p>Ruby on Rails默認使用MVC(模型-視圖-控制器)架構(gòu)來啟動項目的組織。大部分代碼都組織在以下文件夾中:</p><ul>
        <li>與領(lǐng)域/業(yè)務(wù)邏輯和數(shù)據(jù)相關(guān)的代碼應(yīng)保存在<code>app/models</code>文件夾中;</li>
        <li>與顯示相關(guān)的代碼(HTML、JSON、XML等)將位于<code>app/views</code>文件夾中;</li>
        <li>與請求生命周期相關(guān)的代碼將位于<code>app/controllers</code>文件夾中;</li>
        </ul>
        <h3 id="插入-code-html-test-code-頁面的內(nèi)容">插入<code>html_test_1</code>頁面的內(nèi)容</h3>
        <details><summary>展開…</summary>- 訪問鏈接https://github.com/dbohdan/classless-css/blob/master/screenshot-page.html并復(fù)制`<main>`標簽內(nèi)的所有內(nèi)容,如下所示
        <pre class="brush:php;toolbar:false"><code>$ rails -v
        Rails 8.0.0
        
        $ time rails new classless-css-tailwind
        ...
        real    0m47.500s
        user    0m33.052s
        sys     0m4.249s</code></pre>
        </details>
        <h3 id="插入-code-html-test-code-頁面的內(nèi)容">插入<code>html_test_2</code>頁面的內(nèi)容</h3>
        <details><summary>展開…</summary>- 訪問鏈接https://gist.github.com/tommaitland/5865229并復(fù)制`<form>`標簽內(nèi)的所有內(nèi)容,如下所示
        <pre class="brush:php;toolbar:false"><code>$ cd classless-css-tailwind && code .</code></pre>
        <legend>A Sample Form Legend</legend> <label for="name">Name: </label> <label for="email">Email: </label> <label>Button: </label> <label>Single Checkbox: </label> <fieldset><legend>Group of Checkboxes: </legend> <label>Checkbox 1: </label> <label>Checkbox 2: </label> <label>Checkbox 3: </label> <label>Checkbox 4: </label> </fieldset><label>Color: </label> <label>Date: </label> <label>Date, Time (Local): </label> <label>File: </label> <label>Image: </label> <label>Month: </label> <label>Number: </label> <label>Password: </label> <label>Single Radio: </label> <fieldset><legend>Group of Radios: </legend> <label>Radio 1: </label> <label>Radio 2: </label> <label>Radio 3: </label> <label>Radio 4: </label> </fieldset><label>Range: </label> <label>Reset: </label> <label>Time: </label> <label>Search: </label> <label>Tel: </label> <label>Text: </label> <label>URL: </label> <label>Week: </label> This is a button! <label>Select 1: </label> TestTest<label>Select 2: </label> TestTest<label>Select Multiple: </label> TestTest<label>Select Groups: </label> <optgroup label="First Group">TestTest</optgroup><optgroup label="Second Group">TestTest</optgroup><optgroup label="Third Group">TestTest</optgroup><fieldset><legend>Datalist: </legend> <datalist>- 打開`app/views/pages/html_test_2.html.erb`文件并粘貼上面復(fù)制的內(nèi)容
        </datalist></fieldset></details>
        <h3 id="插入-code-html-test-code-頁面的內(nèi)容">插入<code>html_test_3</code>頁面的內(nèi)容</h3>
        <details><summary>展開…</summary>訪問鏈接https://github.com/cbracco/html5-test-page/blob/master/index.html并復(fù)制`<div>`標簽后的所有內(nèi)容,其中包含文本`<div>`
        <pre class='brush:php;toolbar:false;'>
            <title></title><meta content="width=device-width,initial-scale=1" name="viewport"></meta><meta content="yes" name="apple-mobile-web-app-capable"></meta><meta content="yes" name="mobile-web-app-capable"></meta><link href="/icon.png" rel="icon" type="image/png"></link><link href="/icon.svg" rel="icon" type="image/svg+xml"></link><link href="/icon.png" rel="apple-touch-icon"></link></pre></details><p>以上是使用 Tailwind 作為無類 CSS 框架的快速 Ruby on Rails 前端的詳細內(nèi)容。更多信息請關(guān)注PHP中文網(wǎng)其他相關(guān)文章!</p>
        
        
        						</div>
        					</div>
        					<div   id="wjcelcm34c"   class="wzconShengming_sp">
        						<div   id="wjcelcm34c"   class="bzsmdiv_sp">本站聲明</div>
        						<div>本文內(nèi)容由網(wǎng)友自發(fā)貢獻,版權(quán)歸原作者所有,本站不承擔相應(yīng)法律責任。如您發(fā)現(xiàn)有涉嫌抄襲侵權(quán)的內(nèi)容,請聯(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="wjcelcm34c"   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="wjcelcm34c"   class="phpgenera_Details_mainR4">
        						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
        							<div   id="wjcelcm34c"   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="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796832397.html" title="Grass Wonder Build Guide |烏瑪媽媽漂亮的德比" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide |烏瑪媽媽漂亮的德比</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>4 周前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796833110.html" title="<??>:在森林里99夜 - 所有徽章以及如何解鎖" class="phpgenera_Details_mainR4_bottom_title"><??>:在森林里99夜 - 所有徽章以及如何解鎖</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 周前</span>
        										<span>By DDD</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796831605.html" title="烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)" class="phpgenera_Details_mainR4_bottom_title">烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>4 周前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796836699.html" title="Rimworld Odyssey溫度指南和Gravtech" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey溫度指南和Gravtech</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 周前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796831905.html" title="Windows安全是空白或不顯示選項" class="phpgenera_Details_mainR4_bottom_title">Windows安全是空白或不顯示選項</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>4 周前</span>
        										<span>By 下次還敢</span>
        									</div>
        								</div>
        														</div>
        							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
        								<a href="http://ipnx.cn/zh/article.html">顯示更多</a>
        							</div>
        						</div>
        					</div> -->
        
        
        											<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3">
        							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
        								<div   id="wjcelcm34c"   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="wjcelcm34c"   class="phpgenera_Details_mainR3_bottom">
        																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title">
        													<h3>Undresser.AI Undress</h3>
        												</a>
        												<p>人工智能驅(qū)動的應(yīng)用程序,用于創(chuàng)建逼真的裸體照片</p>
        											</div>
        										</div>
        																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title">
        													<h3>Clothoff.io</h3>
        												</a>
        												<p>AI脫衣機</p>
        											</div>
        										</div>
        																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
        									<a href="http://ipnx.cn/zh/ai">顯示更多</a>
        								</div>
        							</div>
        						</div>
        					
        
        
        					<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
        						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
        							<div   id="wjcelcm34c"   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="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796832397.html" title="Grass Wonder Build Guide |烏瑪媽媽漂亮的德比" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide |烏瑪媽媽漂亮的德比</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>4 周前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796833110.html" title="<??>:在森林里99夜 - 所有徽章以及如何解鎖" class="phpgenera_Details_mainR4_bottom_title"><??>:在森林里99夜 - 所有徽章以及如何解鎖</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 周前</span>
        										<span>By DDD</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796831605.html" title="烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)" class="phpgenera_Details_mainR4_bottom_title">烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>4 周前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796836699.html" title="Rimworld Odyssey溫度指南和Gravtech" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey溫度指南和Gravtech</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>3 周前</span>
        										<span>By Jack chen</span>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/1796831905.html" title="Windows安全是空白或不顯示選項" class="phpgenera_Details_mainR4_bottom_title">Windows安全是空白或不顯示選項</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<span>4 周前</span>
        										<span>By 下次還敢</span>
        									</div>
        								</div>
        														</div>
        							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
        								<a href="http://ipnx.cn/zh/article.html">顯示更多</a>
        							</div>
        						</div>
        					</div>
        
        
        											<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3">
        							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
        								<div   id="wjcelcm34c"   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="wjcelcm34c"   class="phpgenera_Details_mainR3_bottom">
        																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_title">
        													<h3>SublimeText3漢化版</h3>
        												</a>
        												<p>中文版,非常好用</p>
        											</div>
        										</div>
        																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title">
        													<h3>Dreamweaver CS6</h3>
        												</a>
        												<p>視覺化網(wǎng)頁開發(fā)工具</p>
        											</div>
        										</div>
        																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
        											<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpmain_tab2_mids_info">
        												<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
        									<a href="http://ipnx.cn/zh/ai">顯示更多</a>
        								</div>
        							</div>
        						</div>
        										
        
        					
        					<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
        						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
        							<div   id="wjcelcm34c"   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="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/laravel-tutori" title="Laravel 教程" class="phpgenera_Details_mainR4_bottom_title">Laravel 教程</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/eyess.png" alt="" />
        											<span>1597</span>
        										</div>
        										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/tiezi.png" alt="" />
        											<span>29</span>
        										</div>
        									</div>
        								</div>
        															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
        									<a href="http://ipnx.cn/zh/faq/php-tutorial" title="PHP教程" class="phpgenera_Details_mainR4_bottom_title">PHP教程</a>
        									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
        										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/eyess.png" alt="" />
        											<span>1488</span>
        										</div>
        										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
        											<img src="/static/imghw/tiezi.png" alt="" />
        											<span>72</span>
        										</div>
        									</div>
        								</div>
        														</div>
        							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
        								<a href="http://ipnx.cn/zh/faq/zt">顯示更多</a>
        							</div>
        						</div>
        					</div>
        				</div>
        			</div>
        							<div   id="wjcelcm34c"   class="Article_Details_main2">
        					<div   id="wjcelcm34c"   class="phpgenera_Details_mainL4">
        						<div   id="wjcelcm34c"   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="wjcelcm34c"   class="phpgenera_Details_mainL4_info">
        
        													<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796831408.html" title="CSS教程,用于創(chuàng)建加載旋轉(zhuǎn)器和動畫" 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/431/639/175181807052041.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CSS教程,用于創(chuàng)建加載旋轉(zhuǎn)器和動畫" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796831408.html" title="CSS教程,用于創(chuàng)建加載旋轉(zhuǎn)器和動畫" class="phphistorical_Version2_mids_title">CSS教程,用于創(chuàng)建加載旋轉(zhuǎn)器和動畫</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 07, 2025 am	 12:07 AM</span>
        								<p class="Articlelist_txts_p">創(chuàng)建CSS加載旋轉(zhuǎn)器的方法有三種:1.使用邊框的基本旋轉(zhuǎn)器,通過HTML和CSS實現(xiàn)簡單動畫;2.使用多個點的自定義旋轉(zhuǎn)器,通過不同延遲時間實現(xiàn)跳動效果;3.在按鈕中添加旋轉(zhuǎn)器,通過JavaScript切換類來顯示加載狀態(tài)。每種方法都強調(diào)了設(shè)計細節(jié)如顏色、大小、可訪問性和性能優(yōu)化的重要性,以提升用戶體驗。</p>
        							</div>
        														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796831743.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/175182386183257.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="解決CSS瀏覽器兼容性問題和前綴" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796831743.html" title="解決CSS瀏覽器兼容性問題和前綴" class="phphistorical_Version2_mids_title">解決CSS瀏覽器兼容性問題和前綴</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 07, 2025 am	 01:44 AM</span>
        								<p class="Articlelist_txts_p">處理CSS瀏覽器兼容性和前綴問題需理解瀏覽器支持差異并合理使用廠商前綴。1.了解常見問題如Flexbox、Grid支持不一,position:sticky失效,動畫表現(xiàn)不同;2.查閱CanIuse確認特性支持情況;3.正確使用-webkit-、-moz-、-ms-、-o-等廠商前綴;4.推薦使用Autoprefixer自動添加前綴;5.安裝PostCSS并配置browserslist指定目標瀏覽器;6.構(gòu)建時自動處理兼容性;7.老項目可用Modernizr檢測特性;8.不必追求所有瀏覽器一致,確</p>
        							</div>
        														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796834914.html" title="顯示:內(nèi)聯(lián),顯示:塊和顯示:內(nèi)聯(lián)塊之間有什么區(qū)別?" 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/175217550090568.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="顯示:內(nèi)聯(lián),顯示:塊和顯示:內(nèi)聯(lián)塊之間有什么區(qū)別?" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796834914.html" title="顯示:內(nèi)聯(lián),顯示:塊和顯示:內(nèi)聯(lián)塊之間有什么區(qū)別?" class="phphistorical_Version2_mids_title">顯示:內(nèi)聯(lián),顯示:塊和顯示:內(nèi)聯(lián)塊之間有什么區(qū)別?</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 11, 2025 am	 03:25 AM</span>
        								<p class="Articlelist_txts_p">Themaindifferencesbetweendisplay:inline,block,andinline-blockinHTML/CSSarelayoutbehavior,spaceusage,andstylingcontrol.1.Inlineelementsflowwithtext,don’tstartonnewlines,ignorewidth/height,andonlyapplyhorizo??ntalpadding/margins—idealforinlinetextstyling</p>
        							</div>
        														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796833145.html" title="使用CSS剪輯路徑創(chuàng)建自定義形狀" 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/175199577133591.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="使用CSS剪輯路徑創(chuàng)建自定義形狀" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796833145.html" title="使用CSS剪輯路徑創(chuàng)建自定義形狀" class="phphistorical_Version2_mids_title">使用CSS剪輯路徑創(chuàng)建自定義形狀</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 09, 2025 am	 01:29 AM</span>
        								<p class="Articlelist_txts_p">使用CSS的clip-path屬性可以裁剪元素為自定義形狀,如三角形、圓形缺口、多邊形等,無需依賴圖片或SVG。其優(yōu)勢包括:1.支持circle、ellipse、polygon等多種基本形狀;2.可響應(yīng)式調(diào)整,適配移動端;3.易于動畫化,可結(jié)合hover或JavaScript實現(xiàn)動態(tài)效果;4.不影響布局流,僅裁剪顯示區(qū)域。常見用法如圓形裁剪clip-path:circle(50pxatcenter)和三角形裁剪clip-path:polygon(50%0%,1000%,00%)。注意</p>
        							</div>
        														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796834918.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/175217558128323.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="造型與CSS不同訪問的鏈接" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796834918.html" title="造型與CSS不同訪問的鏈接" class="phphistorical_Version2_mids_title">造型與CSS不同訪問的鏈接</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 11, 2025 am	 03:26 AM</span>
        								<p class="Articlelist_txts_p">設(shè)置訪問過鏈接的樣式能提升用戶體驗,尤其在內(nèi)容密集型網(wǎng)站中幫助用戶更好導(dǎo)航。1.使用CSS的:visited偽類可定義已訪問鏈接樣式,如顏色變化;2.注意瀏覽器出于隱私限制僅允許修改部分屬性;3.顏色選擇應(yīng)與整體風格協(xié)調(diào),避免突兀;4.移動端可能不顯示該效果,建議結(jié)合其他視覺提示如icon輔助標識。</p>
        							</div>
        														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796837251.html" title="如何使用CSS創(chuàng)建響應(yīng)式圖像?" 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/175251305059116.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="如何使用CSS創(chuàng)建響應(yīng)式圖像?" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796837251.html" title="如何使用CSS創(chuàng)建響應(yīng)式圖像?" class="phphistorical_Version2_mids_title">如何使用CSS創(chuàng)建響應(yīng)式圖像?</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 15, 2025 am	 01:10 AM</span>
        								<p class="Articlelist_txts_p">要使用CSS創(chuàng)建響應(yīng)式圖片,主要可通過以下方法實現(xiàn):1.使用max-width:100%和height:auto讓圖片在保持比例的同時自適應(yīng)容器寬度;2.結(jié)合HTML的srcset和sizes屬性智能加載適配不同屏幕的圖片源;3.利用object-fit和object-position控制圖片裁剪與焦點展示。這些方法共同確保圖片在不同設(shè)備上清晰、美觀地呈現(xiàn)。</p>
        							</div>
        														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796832540.html" title="揭開CSS單元的神秘面紗:PX,EM,REM,VW,VH比較" 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/175191219061804.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="揭開CSS單元的神秘面紗:PX,EM,REM,VW,VH比較" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796832540.html" title="揭開CSS單元的神秘面紗:PX,EM,REM,VW,VH比較" class="phphistorical_Version2_mids_title">揭開CSS單元的神秘面紗:PX,EM,REM,VW,VH比較</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 08, 2025 am	 02:16 AM</span>
        								<p class="Articlelist_txts_p">CSS單位的選擇取決于設(shè)計需求和響應(yīng)式要求。1.px用于固定尺寸,適合精確控制但缺乏彈性;2.em是相對單位,受父元素影響易導(dǎo)致級聯(lián)問題,rem則基于根元素更穩(wěn)定,適合全局縮放;3.vw/vh基于視口大小,適合響應(yīng)式設(shè)計,但需注意極端屏幕下的表現(xiàn);4.選擇時應(yīng)根據(jù)是否需要響應(yīng)式調(diào)整、元素層級關(guān)系及視口依賴程度來決定,合理搭配使用可提升布局靈活性與維護性。</p>
        							</div>
        														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
        								<a href="http://ipnx.cn/zh/faq/1796847484.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/175348469118409.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="什么是常見的CSS瀏覽器不一致?" />
        								</a>
        								<a href="http://ipnx.cn/zh/faq/1796847484.html" title="什么是常見的CSS瀏覽器不一致?" class="phphistorical_Version2_mids_title">什么是常見的CSS瀏覽器不一致?</a>
        								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 26, 2025 am	 07:04 AM</span>
        								<p class="Articlelist_txts_p">不同瀏覽器對CSS解析存在差異,導(dǎo)致顯示效果不一致,主要包括默認樣式差異、盒模型計算方式、Flexbox和Grid布局支持程度及某些CSS屬性行為不一致。1.默認樣式處理不一致,解決方法是使用CSSReset或Normalize.css統(tǒng)一初始樣式;2.舊版IE的盒模型計算方式不同,建議統(tǒng)一使用box-sizing:border-box;3.Flexbox和Grid在邊緣情況或舊版本中表現(xiàn)有差異,應(yīng)多測試并使用Autoprefixer;4.某些CSS屬性行為不一致,需查閱CanIuse并提供降級</p>
        							</div>
        													</div>
        
        													<a href="http://ipnx.cn/zh/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="wjcelcm34c"   class="footer">
                <div   id="wjcelcm34c"   class="footertop">
                    <img src="/static/imghw/logo.png" alt="">
                    <p>公益在線PHP培訓,幫助PHP學習者快速成長!</p>
                </div>
                <div   id="wjcelcm34c"   class="footermid">
                    <a href="http://ipnx.cn/zh/about/us.html">關(guān)于我們</a>
                    <a href="http://ipnx.cn/zh/about/disclaimer.html">免責聲明</a>
                    <a href="http://ipnx.cn/zh/update/article_0_1.html">Sitemap</a>
                </div>
                <div   id="wjcelcm34c"   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://ipnx.cn/" title="亚洲国产日韩欧美一区二区三区">亚洲国产日韩欧美一区二区三区</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="iwow0" class="pl_css_ganrao" style="display: none;"><tfoot id="iwow0"><delect id="iwow0"><noframes id="iwow0"></noframes></delect></tfoot><abbr id="iwow0"></abbr><tfoot id="iwow0"><samp id="iwow0"><pre id="iwow0"></pre></samp></tfoot><ul id="iwow0"><samp id="iwow0"><tr id="iwow0"></tr></samp></ul><noframes id="iwow0"><dfn id="iwow0"><dd id="iwow0"></dd></dfn></noframes><dd id="iwow0"></dd><option id="iwow0"><dl id="iwow0"><xmp id="iwow0"></xmp></dl></option><dfn id="iwow0"><tr id="iwow0"><optgroup id="iwow0"></optgroup></tr></dfn><td id="iwow0"></td><sup id="iwow0"></sup><pre id="iwow0"></pre><option id="iwow0"></option><tbody id="iwow0"></tbody><abbr id="iwow0"><option id="iwow0"><kbd id="iwow0"></kbd></option></abbr><fieldset id="iwow0"><center id="iwow0"><pre id="iwow0"></pre></center></fieldset><ul id="iwow0"><option id="iwow0"><tbody id="iwow0"></tbody></option></ul><nav id="iwow0"></nav><tbody id="iwow0"><xmp id="iwow0"><tfoot id="iwow0"></tfoot></xmp></tbody><dl id="iwow0"><cite id="iwow0"><rt id="iwow0"></rt></cite></dl><del id="iwow0"></del><dd id="iwow0"><acronym id="iwow0"><ul id="iwow0"></ul></acronym></dd><abbr id="iwow0"></abbr><table id="iwow0"></table><fieldset id="iwow0"><center id="iwow0"><th id="iwow0"></th></center></fieldset><tbody id="iwow0"></tbody><option id="iwow0"></option><samp id="iwow0"><acronym id="iwow0"><abbr id="iwow0"></abbr></acronym></samp><kbd id="iwow0"></kbd><rt id="iwow0"></rt><del id="iwow0"></del><menu id="iwow0"><tbody id="iwow0"><noframes id="iwow0"></noframes></tbody></menu><source id="iwow0"></source><object id="iwow0"></object><button id="iwow0"><th id="iwow0"><s id="iwow0"></s></th></button><nav id="iwow0"><bdo id="iwow0"><source id="iwow0"></source></bdo></nav><code id="iwow0"></code><option id="iwow0"><th id="iwow0"><xmp id="iwow0"></xmp></th></option><strong id="iwow0"><abbr id="iwow0"><table id="iwow0"></table></abbr></strong><dd id="iwow0"></dd><table id="iwow0"></table><tbody id="iwow0"><s id="iwow0"><dfn id="iwow0"></dfn></s></tbody><wbr id="iwow0"></wbr><pre id="iwow0"></pre><code id="iwow0"></code><tr id="iwow0"><strike id="iwow0"><rt id="iwow0"></rt></strike></tr><tbody id="iwow0"></tbody><dd id="iwow0"></dd></div>
        
        </html>