On Mobile Safari on an iPhone 4 or iPhone4S, can you have a border of a div that is 0.5px wide?
I use CSS custom properties for this. It is much more elegant (IMHO).
:root {
--hair:1px;
}
.myDiv {
border: var(--hair) solid #CCC;
}
@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx) {
:root {
--hair:0.5px;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With