1、a标签与a标签之间有3px距离

2、标准流中的文字不会被浮动的盒子遮挡

<div style="width:150px;height:150px;background-color:yellow;float:left"></div>
<div style="width:150px;height:50px;background-color:red;">
<span>我的盒子跑到了红色盒子下面,但是我还留在这儿</span>
</div>

红色虽然走了,但是没有带有文字

3、浮动的父盒子要尽量设置宽高。下面代码父盒子设置了宽和浮动,但是没有设置高,所以影响了下面的黄盒子布局。所以浮动的盒子要撑开盒子(没有设置高)的话,就必须让父盒子设置高,让子盒子撑破父盒子是没有问题的。

<body>
<div style="width:1000px;height:50px;border:1px solid red;">
<div style="width:100px; background-color:red;float:left;">
<div style="width:100px;height:100px; background-color:black"></div>
</div>
</div>
<div style="width:200px;height:40px;background-color:yellow; float:left"></div>
</body>

4、谷歌浏览器不支持12px字体以下的字体大小

5、鼠标经过使div内的a标签变色

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.box {
width: 50px;
height: 50px;
background-color: blue;
} .box:hover {
background-color: white;
} .box:hover a {
color: red;
}
</style>
</head>
<body>
<div class="box">
<a>你好</a>
</div>
</body>
</html>

6、定位中的默认权限:left比right,权重高。有left又有right的时候,执行left的值。top比bottom,权重高。有top又有bottom的时候,执行top的值。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
a{
position:absolute;
width:50px;
height:50px;
background-color:aliceblue;
top:50%;
margin-top:-25px;
text-align:center;
font:400 20px/50px "console";
}
.rg{
right:0px;
}
</style>
</head>
<body>
<div style="width:300px;height:300px;position:relative;z-index:-1; background-color:bisque;">
<div style="background-color:red;">
<a>&lt;</a>
<a class="rg">&gt;</a>
</div>
</div>
</body>
</html>

7、虚线与点线

border: 1px dotted #000;//圆点线
border: 1px dashed #000;//虚线

8、text-transform

h1 {text-transform:uppercase}//大写
h2 {text-transform:capitalize}//小写
p {text-transform:lowercase}//首字母大写

9 、a标签中的href属性

<a href="">content</a>//刷新本页
<a href="#">content</a>//跳到顶部,不刷新
<a href="javascript:void(0)">content</a>//阻断跳转,不刷新

10、占位图片:http://via.placeholder.com/350x150

html——特例的更多相关文章

  1. C# 引用类型之特例string

    在C#编程的时候经常会使用字符串(string)类型,它也是引用类型,但是处处都不作为引用的用法来使用,实属特例,下来我一一罗列出来,供自己记忆方便: 1)字符串的直接赋值:本身字符串就是引用类型,应 ...

  2. [20180319]直接路径读特例12c.txt

    [20180319]直接路径读特例12c.txt --//昨天的测试突然想起以前遇到的直接路径读特例,在12c重复测试看看. 1.环境:SCOTT@test01p> @ ver1 PORT_ST ...

  3. Uva LA 3177 - Beijing Guards 贪心,特例分析,判断器+二分,记录区间内状态数目来染色 难度: 3

    题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_pr ...

  4. MT【156】特例$a_n=\dfrac{6}{\pi n^2}$

    设无穷非负数列$\{a_n\}$满足$a_n+a_{n+2}\ge2 a_{n+1},\sum\limits_{i=1}^{n}{a_i}\le1$,证明:$0\le a_n-a_{n+1}\le\d ...

  5. B-spline Curves 学习之B样条曲线的系数计算与B样条曲线特例(6)

    B-spline Curves: Computing the Coefficients 本博客转自前人的博客的翻译版本,前几章节是原来博主的翻译内容,但是后续章节博主不在提供翻译,后续章节我在完成相关 ...

  6. Reverse Nodes In K Group,将链表每k个元素为一组进行反转---特例Swap Nodes in Pairs,成对儿反转

    问题描述:1->2->3->4,假设k=2进行反转,得到2->1->4->3:k=3进行反转,得到3->2->1->4 算法思想:基本操作就是链表 ...

  7. 特例模式(Special Case Pattern)与空对象模式(Null Pointer Pattern)—— 返回特例对象而非 null

    返回 null 值,基本上是在给自己增加工作量,也是给调用者添乱.只有一处没有检查返回的是否为 null,程序就会抛 NullPointerException 异常. 如果你打算在方法中返回 null ...

  8. C++学习之模板特例化

    模板是C++中一个很重要的特性,写一份代码能用于多种数据类型(包括用户自定义类型).例如,STL的sort()函数可以用于多种数据类型的排序,类stack可以用作多种数据类型的栈.但是,如果我们想对特 ...

  9. 格伦布编码——rice编码无非是golomb编码M为2^x的特例

    格伦布编码 格伦布编码是一种无失真资料压缩方法,由数学家所罗门·格伦布在1960年代提出. Rice编码 Robert F. Rice提出Rice 编码,是以哥伦布编码为基础做改良而更简易的前置码.R ...

  10. 《深入实践C++模板编程》之四——特例

    1. 所谓模板特例,是针对符合某种条件的模板参数值集合另外声明的模板实现变体. template<typename T> class my_vector; template<> ...

随机推荐

  1. WEB开发----springboot的登录拦截机制

    如果是一个后台的管理项目的,有些东西是不能直接就可以访问的,必须要登录才可以进去,所以就需要进行登录拦截,只有登录过的用户才可以正常访问. 登录拦截是不会拦截jsp页面的方法,所以我们需要在Contr ...

  2. 武大OJ 613. Count in Sama’s triangle

    Description Today, the math teacher taught Alice Hui Yang’s triangle. However, the teacher came up w ...

  3. Ubuntu 16.04通过Trickle限制某个软件的下载/上传速度

    在Linux下没有Windows使用360那样去限制某个软件的速度. 但是通过Trickle可以设置某个软件的网速,但是前提是通过Trickle命令连带启动这个软件才可以,不能中途去设置. 比如现在很 ...

  4. Spring MVC集成thymeleaf时提示:defined in ServletContext resource [/WEB-INF/SrpingMVCTest-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException

    错误提示: defined in ServletContext resource [/WEB-INF/SrpingMVCTest-servlet.xml]: Instantiation of bean ...

  5. golang中channels的本质详解,经典!

    原文:https://www.goinggo.net/2014/02/the-nature-of-channels-in-go.html The Nature Of Channels In Go 这篇 ...

  6. 1. MissingInteger 最小遗失整数 Find the minimal positive integer not occurring in a given sequence.

    package com.code; import java.util.Arrays; public class Test04_1 { public static int solution(int[] ...

  7. UVA - 10324 Zeros and Ones

    Description Given a string of 0's and 1's up to 1000000 characters long and indices i and j, you are ...

  8. 【C语言】不使用大小于号,求出两数最大值

    //不使用大小于号,求出两数最大值 #include <stdio.h> #include <math.h> double Max(double a, double b) { ...

  9. HBase无法连接ZooKeeper问题

    上次搭建HBase环境后,运行登陆server时,报以下的错误: hadoop@gpmaster logs]$ hbase shell SLF4J: Class path contains multi ...

  10. java学习笔记:文件名区分大小写

    我按照网上的教程,写了JAVA第一个程序:Hello World!,出了两个问题,都栽在 大小写 上. public class Hello { public static void main(Str ...