css - IE11 draws small line between positioned elements -
css - IE11 draws small line between positioned elements -
i constructed thought bubble html , css , found issue solely on ie11 - every other browser (down ie9) works great.
the thought simple: have container contains text , give background-color , round corners. set element , create arrow. position arrow sits right next container.
the problem: somehow, though arrow sits adjusted, there little line between arrow , container. , line less 1px in height. if move arrow notch sits within container cannot accepted due fact arrow , container must have transparency.
here jsfiddle showing problem: http://jsfiddle.net/hurrtz/t2rhr/3/
html simple.
<div id="bubble"> <div class="arrow"></div> </div> css as simple , boils downwards (some pseudo code ahead):
#bubble { (some dimension giving) background-color: rgba(0,0,0,0.5); //black, semitransparent position: relative; } #bubble .arrow { position: absolute; bottom: 0 - height of arrow: background-color: rgba(0,0,0,0.5); //black, semitransparent } by way: problem increases, decreases or seizes exist more allow ie11 zoom in or if browser window's height changed.
here's looks gap in ie11:
a screenshot of picture, zoomed @ 500% shows this:
it's because way border calculated. screen finite grid, when decide center of arc @ coordinates e.g. "10 x, 10 y" mean different things:
the center of arc in middle of 10th pixel? the center of arc @ begginnig of 10th pixel? the center of arc @ end of 10th pixel?so, when draws arc radius 10px go half pixel farther (or closer) point expected (and yield "half pixel" sizes, 2px grayness line wanted 1px black, circle not round or other sad surprise).
this kind of different behaviour mutual among major browsers (e.g. see this: border-radius: 50% not producing perfect circles in chrome ) think shouldn't considered bug, implementation decisions unluckily differ browser another.
the mutual solutions play border width (0.5px,1px,2px) , radius (even/odd sizes) or positioning decimals (bottom: -19.5px?). can't wich combination yield best results case since can't reproduce in windows 7 + ie11.
css internet-explorer-11
Comments
Post a Comment