Way to import small parts of semantic ui?

百般思念 提交于 2019-12-11 04:39:59

问题


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

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.

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


回答1:


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>

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



来源:https://stackoverflow.com/questions/45297987/way-to-import-small-parts-of-semantic-ui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!