发票功能开发小结
1 li前面的点消除:
list-style:none;
li不需要选不同的class名称。只需要一个class。可以使用 :nth-child(n).
<!DOCTYPE html> <html> <head> <style> p:nth-child(odd) { background:#ff0000; } p:nth-child(even) { background:#0000ff; } </style> </head> <body> <h1>这是标题</h1> <p>第一个段落。</p> <p>第二个段落。</p> <p>第三个段落。</p> <p>第四个段落。</p>
2 总体布局来看:使用ul来进行布局比:div更方便。因为更容易进行横向排列。
其次:由于是添加一个表单,但是在整体的一个布局外已经存在form了,所以不需要。
3 解决UL出现0的情况:1 overflow:hidden,让里面的内容将其撑开。2 在最后一个元素加上:
.opc_choose::after{
content: '';
clear: both;
display: table;
使用但是不推荐给ul这个容器添加宽度和高度。
4 针对
此时li不能float了是因为在整个页面,样式冲突了。修改名称。
5 如何找到元素:
(1 p.opc_invice :p标签的名字叫opc_invice
(2 p#opc_invice :p标签的ID
(3 p (空格).opc_invice : p元素下面有个opc_invice的class
(4 .opc_invice(空格)p : class叫opc_invice下面的P
6 sublime 整体向左移动: command+[ 就可以了。
7 有了浮动之后:margin:auto 会失效。
8 给li一个
line-height: 40px;
height: 40px;
是为了确保所有的li的高度是统一的。
9 radio中的name需要一样的名称。
10