语义 ui 框架是否支持 rtl 语言?

2022-01-16 00:00:00 frameworks css

如何使语义 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">

相关文章