码迷,mamicode.com
首页 > Web开发 > 详细

html知识收集(一)

时间:2014-11-10 09:49:15      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:color   ar   使用   sp   div   on   cti   bs   html   

1.页内跳转iframe

<ul>

<li><a href="1.html" target="iframe1">1</a></li>

<li><a href="2.html" target="iframe1">2</a></li>

</ul>

</ul>

<iframe name="iframe1" src="0.html"></iframe>

2.打开链接

<a href="url" target="_blank">新窗口中打开</a>

<a href="url" target="_parent">在原窗口中打开</a>

3.text元素设为只读

<input type="text" disabled readonly />

4.css技巧

默认样式值:* {margin: 0; padding: 0; background-color: transparent;}

css中子元素自动继承父元素的属性值

对同一元素的css定义有多种,以最近的定义为最优先

一个标签可以定义多个class

派生选择器:div p {}

组选择器:h1, h2 {}

不需要给背景图片加引号:background-image: url(images/a.gif)

正确的顺序指定连接样式:a:link, a:visited, a:hover, a:active

调试技巧:使用background,避免用border,因为border可能会改变div大小

 

html知识收集(一)

标签:color   ar   使用   sp   div   on   cti   bs   html   

原文地址:http://www.cnblogs.com/feilv/p/4086400.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!