博客原文 https://longweibing.github.io/2018/01/15/div外观例子/

标题

我的标题

内容

Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.
Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.
Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.
Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.
Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.

css源码

/* The designer of div */

.title_white{

color: #fafafa;

letter-spacing: 0;

font-size: 50px;

text-shadow: 0px 1px 0px #999, 0px 2px 0px #888, 0px 3px 0px #777, 0px 4px 0px #666, 0px 5px 0px #555, 0px 6px 0px #444, 0px 7px 0px #333, 0px 8px 7px #001135;

}

/* The color of word in div is white and the background color is blue(the blue is a little light) */

.content_blue {

padding: 5px;

margin: 12px;

display:inline-block;

*display:inline;

*zoom:1;

background-color: #017CC2;

color: #ffffff;

font-family: 微软雅黑;

letter-spacing: 2px;

}

/* The color of word in div is yellow and the background color is black(the yellow is a little light) */

.content_black {

padding: 5px;

margin: 12px;

display:inline-block;

*display:inline;

*zoom:1;

background-color: #1c1c1c;

color: #EEFF99;

font-family: 微软雅黑;

letter-spacing: 2px;

}

/* The color of word in div is black and the background color is gray */

.content_gray {

padding: 5px;

margin: 12px;

display:inline-block;

*display:inline;

*zoom:1;

background-color: #cccccc;

color: #000000;

font-family: 微软雅黑;

letter-spacing: 2px;

}

/* The color of word in div is black and the background color is white, but the border is gray */

.content_gray_border {

padding: 5px;

margin: 12px;

display:inline-block;

*display:inline;

*zoom:1;

border: 0.5px solid #cccccc;

background-color: #ffffff;

color: #017cc2;

font-family: 微软雅黑;

letter-spacing: 2px;

}

/* The color of word in div is black and the background color is yellow(the yellow is a little light), but it has a little shadow. */

.content_yellow_shadow{

padding: 5px;

margin: 12px;

display:inline-block;

*display:inline;

*zoom:1;

-webkit-box-shadow: #666 0px 0px 10px;

-moz-box-shadow: #666 0px 0px 10px;

box-shadow: #666 0px 0px 10px;

background: #EEFF99;

font-family: 微软雅黑;

letter-spacing: 2px;

}

导入html格式

1.在html的head标签加入
2.在div中导入

html实例代码如下


<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/div_designer.css">
<title>div desinger</title>
</head>
<body> <div class="title_white">我的标题</div> <div class="content_blue">Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.</div> <div class="content_black">Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.</div> <div class="content_gray">Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.</div> <div class="content_gray_border">Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.</div> <div class="content_yellow_shadow">Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS.</div>
</body>
</html>

div外观例子的更多相关文章

  1. DIV+CSS例子

    DIV水平居中+垂直居中 #main_zone{ width:1190px; height:570px; background-color:#fff; margin:0 auto; /*左右居中*/ ...

  2. 关于div及display

    1.DIV div被看作是一个盒子,可以设置width.height.这个盒子其实是由三部分构成width(height).padding.border.在默认情况下,所见到的div是border和p ...

  3. 【使用DIV+CSS重写网站首页案例】CSS选择器

    使用表格<table></table>对网站首页进行布局有缺陷,不能拖动版块,不灵活. DIV Div是一个html的标签,单独使用没有意义,必须结合CSS使用: 是一个块级元 ...

  4. CSS选择器div和p的用法和区别

    div,p.div p.div>p.div+p.div~p.div.a的用法和区别 div,p:选择所有<div>元素和<p>元素 <style> p,spa ...

  5. 前端基础div(六)

    实例 文档中的一个部分会显示为绿色: <div style="color:#00FF00"> <h3>This is a header</h3> ...

  6. JavaScript 闯关记

    DOM(文档对象模型)是针对 HTML 和 XML 文档的一个 API.DOM 描绘了一个层次化的节点树,允许开发人员添加.移除和修改页面的某一部分. 节点层次 DOM 可以将任何 HTML 或 XM ...

  7. 【MVC 4】5.SportsSore —— 一个真实的应用程序

     作者:[美]Adam Freeman      来源:<精通ASP.NET MVC 4> 前面建立的都是简单的MVC程序,现在到了吧所有事情综合在一起,以建立一个简单但真实的电子商务应用 ...

  8. 《JavaScript 闯关记》之 DOM(下)

    Element 类型 除了 Document 类型之外,Element 类型就要算是 Web 编程中最常用的类型了.Element 类型用于表现 XML 或 HTML 元素,提供了对元素标签名.子节点 ...

  9. javascript入门笔记3-dom

    1.通过ID获取元素 document.getElementById("id") <!DOCTYPE HTML> <html> <head> & ...

随机推荐

  1. vim配置分享(持续更新中)

    作者:zhanhailiang 日期:2014-10-24 set nocompatible set nu   "" 自己主动缩进 syntax on set autoindent ...

  2. CI学习 CCNET Config 第一天

    CCNet的整体结构就是一个Xml文档,根元素就是cruisecontrol,具体的代码块如下所示: <cruisecontrol xmlns:cb="urn:ccnet.config ...

  3. 解决 ASP.NET Core Hangfire 未授权(401 Unauthorized)

    相关文章:ASP.NET Core 使用 Hangfire 定时任务 ASP.NET Core Hangfire 在正式环境发布之后,如果访问 http://10.1.2.31:5000/hangfi ...

  4. 使用python实现群发邮件

    最近在工作时,需要实现在公司开发的调度系统上实现:将每天产生的游戏数据查询统计出,并发送邮件给数据分析的开发人员. 考虑到python语言的简洁易上手,在我没有任何python基础的情况下,十分轻松的 ...

  5. sed从入门到深入修炼目录

    sed系列文章: sed修炼系列(一):花拳绣腿之入门篇sed修炼系列(二):武功心法(info sed翻译+注解)sed修炼系列(三):sed高级应用之实现窗口滑动技术sed修炼系列(四):sed中 ...

  6. redis的sort命令

    1.简单描述 sort命令可以对list.set和sorted set的元素进行排序,然后显示排序的结果,不影响这些类型里面存储的数据的排序.就是说sort可以对list的元素排序,但是执行lrang ...

  7. django+Echarts实现数据可视化

    1.实时异步加载(从mysql读取数据) 2.scatter散点图 3.雷达图(参数选择要注意) time_1 time_2 time_3 4.面积图 我上传的源码请到github下载:https:/ ...

  8. JavaScript--AJAX页面传值

    1.首先 闲话不说 直接代码走起,都是我工作闲事的积累干货 //重要 js 运行 $(function (){ 代码 }); 2.ajax 传值 //第一种 输入框 <input type=&q ...

  9. 【ANT】使用ANT自动执行JMeter用例

    1.把\apache-jmeter-3.1\extras目录下的build.xml和jmeter-results-detail-report_21.xsl两个文件拷贝到用例所在目录: 2.修改用例名称 ...

  10. JMeter 插件 Json Path 解析HTTP响应JSON数据

    一.基本简介 JMeter 是一个不错的负载和性能测试工具,我们也用来做 HTTP API 接口测试.我们的 API 返回结果为JSON数据格式.JSON 简介,JSON 教程. JSON 已经成为数 ...