导入语义ui的小部分的方法? [英] Way to import small parts of semantic ui?

查看:30
本文介绍了导入语义ui的小部分的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 semantic-ui 中的特定模块,https://semantic-ui.com/modules/sticky.html

I'd like to use specific modules from semantic-ui , https://semantic-ui.com/modules/sticky.html

假设我也主要使用其他框架(例如bootstrap).我不想只为我需要的一个模块包含整个 semantic-ui.

Suppose I also use other frameworks mainly (such as bootstrap). I wouldn't want to include the whole semantic-ui just for the one module I need.

有没有办法只从semantic-ui导入(包含..)我需要的特定模块?

Is there a way to import (include..) only the specific modules I need from semantic-ui?

推荐答案

只需要包含特定组件的 .css 文件和 .js(如果可用)文件.以下是 CDN 的示例:

Just simply include .css file and .js (if it's available) file of the specific component. Here is an example with a CDN:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.11/components/sticky.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.11/components/sticky.js" ></script>

您可以在 dist/components/ 中找到所有组件 文件夹,有关语义ui安装的更多信息,请参阅GitHub 上的语义 UI

You can find all the components in dist/components/ folder, for more information about semantic-ui installation see Semantic-UI on GitHub

这篇关于导入语义ui的小部分的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆