問題描述
如何使語義 ui 框架支持從右到左"?在那兒無論如何讓它 rtl 支持安裝步驟?
how to make semantic ui framework "right-to-left" supported ? is there anyway to make it rtl support in installing steps or not ?
推薦答案
以下場景可以開啟RTL支持:
You can enable RTL support under the following scenarios:
轉到項目的文檔根目錄并通過 npm 安裝語義用戶界面
go to the document root of your project and install semantic-ui through npm
npm install semantic-ui --save
npm install semantic-ui --save
修改文檔根目錄中的 semantic.json 文件以啟用從右到左的支持,如下所示:
modify semantic.json file in document root to enable right to left support as following:
rtl":真
在您的終端中將目錄更改為 semantic 目錄
in your terminal change directory to semantic directory
cd語義/
運行以下 gulp 任務以構建所有文件并將其保存到目標文件夾
run the following gulp task to build all files and save it to destination folder
gulp 構建
gulp 將自動檢測 RTL 支持并構建 css 文件的 RTL 版本并將它們保存在 dist 文件夾中,現在非常重要的最后一步是在 index 中引用語義-ui css 文件的 RTL 版本.html 或網頁如下:
gulp will auto-detect the RTL support and build the RTL version of css files and save them in dist folder, now a very important final step is to reference the RTL version of semantic-ui css file in your index.html or web page as following:
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.rtl.css">
<小時>
2.現有安裝
在您的終端中將目錄更改為 semantic 目錄
cd語義/
使用semantic-ui框架提供的gulp任務清理目標文件夾
Clean the destination folder using the gulp task provided by semantic-ui framework
一飲而盡
修改文檔根目錄中的 semantic.json 文件以啟用從右到左的支持,如下所示:
modify semantic.json file in document root to enable right to left support as following:
rtl":真
運行以下 gulp 任務以構建所有文件并將其保存到目標文件夾
run the following gulp task to build all files and save it to destination folder
gulp 構建
gulp 將自動檢測 RTL 支持并構建 css 文件的 RTL 版本并將它們保存在 dist 文件夾中.
gulp will auto-detect the RTL support and build the RTL version of css files and save them in dist folder.
現在您需要從
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.css">
到
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.rtl.css">
這篇關于語義 ui 框架是否支持 rtl 語言?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!