为什么使用css框架

1.使用基础样式 :  ui segment

  • 分段:内容片段

    <link rel="stylesheet" href="css/semantic.css" media="screen" title="no title" charset="utf-8">         路径要写对
 <div class="ui segment"></div>  基础样式   

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>first web</title>
<link rel="stylesheet" href="css/semantic.css" media="screen" title="no title" charset="utf-8">
</head>
<body> <div class="ui segment">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div> <div class="ui segment">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div> <div class="ui segment">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div> </body>
</html>

2.使用形容词改变样式

 (1)inverted + colors

  • 按钮可以被设置为暗色背景(幽灵按钮)
  • inverted  翻转格式
 <div class="ui inverted red segment">
<div class="ui inverted blue segment">
<div class="ui inverted segment">

  

  (2).垂直段落:vertical

<div class="ui vertical segment">

    

  (3).Padded  内距

  • A segment can increase its padding
    <div class="ui inverted  padded vertical  segment">
  <div class="ui inverted  very padded vertical  segment">

3.使用嵌套制作网页片段

  (1)版本1:大框架

    

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>first web</title>
<link rel="stylesheet" href="css/semantic.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div class="ui segment">
header
</div> <div class="ui segment">
content
</div> <div class="ui segment">
boot
</div> </body>
</html>

  (2)版本2:内收 :continer segment

    <div class="ui container segment">
content
</div>

  

  (3) 版本3:标题

  • Header 提供了内容的简短摘要
<h1 class="ui header">First web</h1>

  (4)版本4:按钮button

 <button type="button" name="button" class="ui button">Read more </button>

  (5) 版本5:翻转样式

  • inverted + color
        <button type="button" name="button" class="ui inverted blue button">Read more</button>

  (6) 版本6:兄弟标签,父亲标签

    <div class="ui vertical segment">
<div class="ui container segment"> <h1 class="ui header">First web</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
</p>
<button type="button" name="button" class="ui inverted blue button">Read more</button>
</div> </div>

  (7)版本7:添加图片

  • class="ui image"
      <div class="ui image">
<img src="data:images/banner.jpg" alt="" />
</div>

  (8) 版本8:footer

    <div class="ui inverted very padded segment">
maguacoding
</div>

4.完整代码

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>first web</title>
<link rel="stylesheet" href="css/semantic.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div class="ui inverted vertical segment">
<div class="ui image">
<img src="data:images/banner.jpg" alt="" />
</div>
</div> <div class="ui vertical segment">
<div class="ui container segment">
<h1 class="ui header">First web</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
</p>
<button type="button" name="button" class="ui inverted blue button">Read more</button>
</div>
</div> <div class="ui vertical segment">
<div class="ui container segment">
<h1 class="ui header">First web</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
</p>
<button type="button" name="button" class="ui inverted blue button">Read more</button>
</div>
</div> <div class="ui inverted very padded segment">
maguacoding
</div> </body>
</html>

  

2 semantic ui 框架的应用的更多相关文章

  1. semantic ui框架学习笔记一

    面包屑导航 面包屑导航经常用于多个栏目下的内容管理,是web页面里比较常用的组合.例如: <div class="ui breadcrumb"> <a class ...

  2. semantic ui框架学习笔记三

    网格系统 基本网格 <div class="ui grid"> <div class="column"></div> < ...

  3. semantic ui框架学习笔记二

    评论组件 文档里的评论组件介绍的比较清晰.这里我就挑一个我喜欢的格式展示出来: <div class="ui comments"> <h3 class=" ...

  4. 目前几款基于html5的前端框架:如Bootstrap、Foundation、Semantic UI 、Amaze UI

    Bootstrap是由Twitter在2011年8月推出的开源WEB前端框架,集合CSS 和HTML,使用了最新的浏览器技术,为快速WEB开发提供了一套前端工具包,包括布局.网格.表格.按钮.表单.导 ...

  5. Semantic UI 语义化设计的前端框架

    UI是Web的灵魂!Semantic UI是一款语义化设计的前端框架,为攻城师而制作的可复用的开源前端框架. 特性 弃用有歧义的表述 Semantic是围绕自然交流语言而架构的,这使得开发更加直观(易 ...

  6. 2015年最全的移动WEB前端UI框架

    目前,众多互联网公司APP都嵌入了大量的HTML5,移动端的开发越来越重视,HTML5的运用场景也越来越多了.在移动WEB开发的过程中,使用合适的移动WEB UI框架可以大大提升我们的开发效率.下面P ...

  7. Semantic UI 中文参考手册

    一个拥有友好词汇表的前端框架,完全语义化的前端界面开发框架,为一组开发人员之间共享UI元素配备了规格.使用的词汇(类和ID)相比其它替代品更加简洁,从而降低了学习曲线.有许多HTML元素,UI元素和场 ...

  8. 160908、前端开发框架Semantic UI

    简介 网页开发中,CSS控制网页样式.作为测试开发工程师,我个人不太擅长手写CSS.样式微调.兼容浏览器等工作,所以我选择使用成熟的前端框架,可以快速开发出样式美观的网站,也解决了大部分浏览器兼容问题 ...

  9. semantic UI first web

    官方文档:https://semantic-ui.com/introduction/getting-started.html semantic  UI: SemanticUI是一款语义化设计的前端开源 ...

随机推荐

  1. 诸葛io | 精细化运营分析解决方案

    类型: 定制服务 软件包: business intelligence internet media solution collateral 联系服务商 产品详情 解决方案 概要 数据监测 ? 异常发 ...

  2. check_mk 分布式监控

    http://mathias-kettner.com/checkmk_wato_distributed.html peer(贵族) 管理多个slave 复制配置文件 /etc/check_mk/con ...

  3. April 10 2017 Week 15 Monday

    He alone is poor who does not possess knowledge. 没有知识,才是贫穷. Knowledge, as a important part of wisdom ...

  4. MySQL安装和简单操作

    MySQL数据库安装与配置详解 MySQL的安装请参考下面这篇博客,讲述的非常详细,各种截图也很清晰.http://www.cnblogs.com/sshoub/p/4321640.html MySQ ...

  5. *204. Count Primes (siecing prime)

    Count the number of prime numbers less than a non-negative number, n. Example: Input: 10 Output: 4 E ...

  6. hdu-2852 KiKi's K-Number---二分+树状数组

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2852 题目大意: 题意:    给出三种操作,    0 在容器中插入一个数.    1 在容器中删 ...

  7. Android(java)学习笔记62:android.intent.action.MAIN 与 android.intent.category.LAUNCHER 理解

    1. 先看看网路上的说法: android.intent.action.MAIN 决定应用程序最先启动的 Activity android.intent.category.LAUNCHER 决定应用程 ...

  8. firewalld 使用简介

    学习apache安装的时候需要打开80端口,由于centos 7版本以后默认使用firewalld后,网上关于iptables的设置方法已经不管用了,想着反正iptable也不会用,索性直接搬官方文档 ...

  9. python对表格的使用

    #!user/bin/env python # coding=utf- import xlrd def readExcelDataByName(filename, sheetName): '''读取E ...

  10. 2018年第九届蓝桥杯【C++省赛B组】第三题 乘积尾零

    如下的10行数据,每行有10个整数,请你求出它们的乘积的末尾有多少个零?5650 4542 3554 473 946 4114 3871 9073 90 43292758 7949 6113 5659 ...