.box1 { height:0; width:0; font-size:0; /* IE兼容 */ line-height:0px; /* IE兼容 */ border-color:#FF9600 transparent transparent transparent; border-style:solid dashed dashed dashed; /* dashed是为IE6兼容 */ border-width:55px; } .box3 { height:100px; width:100px; font-size:0; /* IE兼容 */ line-height:0px; /* IE兼容 */ border-color: red blue #FF9600 black; border-style: solid solid solid solid; /* dashed是为IE6兼容 */ border-width:30px; } <div id="box1" class="box1"></div><div [...]
Category Archives: css
CSS中Display与Visibility的不同点
大多数人很容易将CSS属性中display和visibility混淆,它们看似没有什么不同,其实它们的差别却是很大的。 首先说一下相同点: 显示时display等于空,visibility等于visible。 不显示时display等于none,visibility等于hidden。 在这点上是没有什么区别的。 再来说一下不同点: 如display和visibility设为不显示div块元素时,display设置的div块元素会被下面的元素自动填充, 但visibility却不是,它只是隐藏,设置的div块元素不会被下面紧跟着的元素填充,div块元素还是存在的。 上面这些就是我的看法,也许有不足之处,希望大家能够帮助指正。
页面中按钮刷新的几种方法
<input onclick="history.go(0)" type="button" value="刷新" /> <input onclick="location.reload()" type="button" value="刷新" /> <input onclick="location=location" type="button" value="刷新" /> <input onclick="location.assign(location)" type="button" value="刷新" /> <input onclick="document.execCommand(‘Refresh’)" type="button" value="刷新" /> <input onclick="window.navigate(location)" type="button" value="刷新" /> <input onclick="location.replace(location)" type="button" value="刷新" /> <input onclick="window.open(‘自身的文件’,'_self’)" type="button" value="刷新" /> <input onclick="document.all.WebBrowser.ExecWB(22,1)" type="button" value="刷新" />
CSS 让超出DIV宽度范围的文字自动显示省略号… 和 位置固定
关键是:text-overflow: ellipsis;
CSS 鼠标形状
style=”cursor:pointer” 手形 style=”cursor:crosshair” 十字形 style=”cursor:text” 文本形 style=”cursor:wait” 沙漏形 style=”cursor:move” 十字箭头形: style=”cursor:help” 问号形 style=”cursor:e-resize” 右箭头形 style=”cursor:n-resize” 上箭头形 style=”cursor:nw-resize” 左上箭头形 style=”cursor:w-resize” 左箭头形 style=”cursor:s-resize” 下箭头形 style=”cursor:se-resize” 右下箭头形 style=”cursor:sw-resize” 左下箭头形