博客原文 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. mybatis关联

    title: mybatis关联 date: 2017-12-18 18:00:30 tags: - [mybatis] categories: - [编程] - [开发工具] permalink: ...

  2. 自学Python2.7-collections系列

    Python collections系列 Python拥有一些内置的数据类型,比如str, int, list, tuple, dict等, collections模块在这些内置数据类型的基础上,提供 ...

  3. thymeleaf模板的使用(转)

    作者:纯洁的微笑 出处:http://www.ityouknow.com/ 在上篇文章springboot(二):web综合开发中简单介绍了一下thymeleaf,这篇文章将更加全面详细的介绍thym ...

  4. 前后端分离ueditor富文本编辑器的使用-Java版本

    最近在写一个自己的后台管理系统(主要是写着玩的,用来熟悉后端java的知识,目前只是会简单的写点接口),想在项目中编写一个发布新闻文章的功能,想到了使用百度的ueditor富文本编辑器,网上找了很多j ...

  5. 【CSS3】背景

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  6. JavaScript:AOP实现

    AOP的概念,使用过Spring的人应该都不陌生了.Dojo中,也是支持AOP的.对于JavaScript的其他框架.库不知道有没有AOP的支持.相信即便没有支持,也不会太远了.下面就介绍一下使用Ja ...

  7. DeepLearning.ai学习笔记(一)神经网络和深度学习--Week4深层神经网络

    一.深层神经网络 深层神经网络的符号与浅层的不同,记录如下: 用\(L\)表示层数,该神经网络\(L=4\) \(n^{[l]}\)表示第\(l\)层的神经元的数量,例如\(n^{[1]}=n^{[2 ...

  8. [Maximize ∑arr[i]*i of an Array]

    Given an array of N integers. Your task is to write a program to find the maximum value of ∑arr[i]*i ...

  9. ES6 函数的扩展3

    箭头函数 基本用法 ES6允许使用"箭头"(=>)定义函数 var f = v => v; 上面的箭头函数等同于: var f = function(v) { retu ...

  10. tcpdump 命令详解

    TCPdump: dump  traffic on a network ,根据使用者的定义对网络上的数据包进行截获的一种包分析工具. TCPdump 可以讲网络中传送的数据包的 头信息完全截获下来提供 ...