C
C
Cyril2015-12-23 16:34:15
css
Cyril, 2015-12-23 16:34:15

Why does a gap appear on tablets and mobile phones?

When I draw triangles with CSS using the :after and :before pseudo-elements, there is sometimes a gap between the triangle and the box.
This only happens on tablets and mobile phones. Why is this happening?
01c0bff06d1d4cacb46e9a4bce870f78.jpg

.box {
    position: relative;
    width: 60px;
    height: 30px;
    background: #40a33d
}

.box:after {
    position: absolute;
    content: "";
    top: 100%;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 30px 0 30px;
    border-color: #40a33d transparent transparent transparent;
}

Is it likely that the problem is in the rendering (engine)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pshkll, 2015-12-23
@Pshkll

Why can't I download from this link?
Code / site give?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question