博客原文 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. Android 获取SD卡路径和推断SD卡是否存在

    android获取sd卡路径方法: 不建议直接写死android sd卡的路径. public String getSDPath(){ File sdDir = null; boolean sdCar ...

  2. Automatic Preferred Max Layout Width is not available on iOS versions prior to

    警告:Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0 如: 找到: : 改动为:

  3. hdu2601 An easy problem(数学)

    题目意思: http://acm.hdu.edu.cn/showproblem.php? pid=2601 给出一个数N,求N=i*j+i+j一共同拥有多少种方案. 题目分析: 此题直接暴力模拟就可以 ...

  4. 为WebClient增加Cookie的支持

    我们经常会在应用程序中使用到WebClient模拟访问网站资源并且进行处理,如果多次访问之间我们希望为他们保存Cookie,换句话说,第一个请求产生的Cookie能自动带到第二个请求的话,可以通过自定 ...

  5. 自学Zabbix3.5.6-监控项item-Value mapping值映射

    zabbix为了显示更人性化的数据,在使用过程中,我们可以将获取到得数据映射为一个字符串.比如,我们写脚本监控MySQL是否在运行中, 一般返回0表示数据库挂了,1表示数据库正常,还有各种各样的监控都 ...

  6. 青否云 - 小程序待办事项 wxapp开源系统

    青否云最新开源系统:小程序待办事项 wxapp-demo 青否云 小程序 demo 下载地址:https://github.com/qingful/wxapp-demo 官网 http://cloud ...

  7. iOS 环信集成项目应用

    环信iOS端3.0版本集成记录--聊天界面篇 环信离线推送证书... 1,环信处在后台的时候,消息的接收与推送 离线发推送 配置属性 EMCallOptions *options = [[EMClie ...

  8. mouseout、mouseover和mouseleave、mouseenter区别

    今天在使用鼠标事件时,用错了mouseout,于是做个测试总结. 结论: mouseenter:当鼠标移入某元素时触发. mouseleave:当鼠标移出某元素时触发. mouseover:当鼠标移入 ...

  9. iView的使用【CDN向】

    直接粗暴地上html代码 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...

  10. Swift学习第一天--面向过程

    //: Playground - noun: a place where people can play import UIKit //---------------------- Hello wor ...