javascript - define border width(not thickness) -
Can I define border widths like
.box {width: 200px ; Height: 100px; Border bottom: 1px solid # 000; }
The box width is 200px
but I want the width of the border just below 100px
.
It seems as if you want a half-range odd, but possible, I think this is working in Firefox, Chrome and Safari MSIE I do not have the hand at this time, and can cause problems
The way it works, it has a background color Is half width, and 1 pixel tall compared to div.box
. I have put a brown background on the body so that you can work it out.
& lt; Html & gt; & Lt; Style type = "text / css" & gt; Body {background-color: # ccc; Color: # 000; } .box-border {width: 100px; / * Half wide. Box! * / Height: 101px; A little longer than / * .box! * / Background color: # 000; Overflow: visible; / * .box, inside it, can go outside * /} .box {width: 200px; Height: 100 pixels; Background color: #fff; } & Lt; / Style & gt; & Lt; Body & gt; & Lt; Div class = "box-limit" & gt; & Lt; Div class = "box" & gt; The quick brown fox jumped over the lazy dog. & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Comments
Post a Comment