安装node
mac
方式一:
brew install node
方式二:
git clone git://github.com/ry/node.git cd node ./configure make sudo make install
linux
ubuntu
curl --silent --location https://deb.nodesource.com/setup_5.x | sudo bash - sudo apt-get install --yes nodejs
Debian
apt-get install curl curl --silent --location https://deb.nodesource.com/setup_5.x | bash - apt-get install --yes nodejs
Red Hat
curl --silent --location https://rpm.nodesource.com/setup | bash - yum -y install nodejs
windows
安装Gulp
npm install -g gulp
安装Semantic-UI
npm install semantic-ui --save
cd semantic/
gulp build
- components 目录下面是单独的一些组件,如果你只想使用 Semantic UI 里的某些组件,可以在这个目录下面找到这些组件。如果你想使用全部的组件,可以使用 semantic.css 与 semantic.js ,或者使用它们的最小化之后的版本,semanitc.min.css 与 semantic.min.js
使用Semantic-UI
页面中加入如下代码
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css"> <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> <script src="semantic/dist/semantic.min.js"></script>