button的width和height和标准的盒模型不一致,是指的包含边框在内的宽度和长度测试代码:1,chrome(1)text内容区域:169*15pxpadding:1px 0border:2px;margin:0所以总宽度是:169+4=173px总高度是:15+6=21px;(2)butt...
分类:
其他好文 时间:
2015-04-02 18:11:13
阅读次数:
141
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>jQuery打造鼠标悬停图片时的半透明遮罩效果</title><style>*{margin:0;padding:0;}li{list-style:none;}.box{width:800px;height:400px;margin:50pxauto;overflow:hidden;}.boxulli{wid..
分类:
Web程序 时间:
2015-04-01 20:17:54
阅读次数:
184
1、内边距paddingpadding-top、padding-right、padding-bottom、padding-leftpadding:top、right、bottom、left;2、外边距margin同上。margin高度上会合并、取最大的那个外边距3、边框border
分类:
其他好文 时间:
2015-04-01 19:18:24
阅读次数:
122
jquery outerHeight方法 outerWidth方法转:http://www.cnblogs.com/zhja/archive/2012/11/07/2758665.htmljquery的width()方法获取到的宽度是不包含元素的padding值、margin值、以及border值的...
分类:
Web程序 时间:
2015-04-01 14:58:19
阅读次数:
1030
在谷歌浏览器上,如果你有类似以下的css代码body {
margin: 0;
font-size: 1.4rem;
line-height: 1.5;
background-color: white;
height: 100%;
}然后你使用em定义div等页面元素的高度,宽度,边距等,在谷歌浏览器上会出现大小比预期的大一倍左右的Bug,然后刷新了就好了
解决办法是把fon...
分类:
其他好文 时间:
2015-04-01 09:38:02
阅读次数:
164
<!DOCType?html>
<html>
<head>
<meta?charset="utf8"?/>
<style?type="text/css">
????.tip?{
????????position:relative;
????????margin-left:4px;
????????background-colo...
分类:
其他好文 时间:
2015-04-01 00:32:46
阅读次数:
148
用CSS让元素居中显示并不是件很简单的事情。同样的CSS居中设置在不同浏览器中的表现也各有千秋。本文就介绍了在CSS中常见的几种让元素水平居中显示的方法。 1.使用自动外边距实现居中 CSS中首选的让元素水平居中的方法就是使用margin属性—将元素的margin-left和margin-rig.....
分类:
Web程序 时间:
2015-03-31 23:48:02
阅读次数:
152
#sidebar {float:left; width:200px; height:500px; background:#cf9;}#content { margin-left:205px !important; margin-left:202px; width:expressio...
分类:
其他好文 时间:
2015-03-31 12:15:48
阅读次数:
104
本文使用图片均为500px*500px
如图
代码如下:
*{
padding: 0px;
margin: 0px;
}
body {
height: 100%;
width: 100%;
background-color: black;
}...
分类:
Web程序 时间:
2015-03-31 09:15:58
阅读次数:
162
关于默认元素在不同浏览器中的margin值是多少的问题,今天做了一个探讨复制代码代码如下:// body的margin值firefox 20.0 ----------------------- body的margin为: margin:8px 8px 8px 8px;Internet Explore...
分类:
其他好文 时间:
2015-03-31 00:33:28
阅读次数:
155