+ 1

I need your help.

Good day. I drew something like a triangle from the css border, and I want to circle this triangle with a black line 2 pixels along the outer edge. How can I do it? https://code.sololearn.com/W2NjzjKBGQkC/?ref=app

24th Mar 2019, 12:58 PM
Алмат Айтбаев
Алмат Айтбаев - avatar
5 Respostas
+ 2
you can male child inner triangle lile .triangle-left { width: 0; height: 0; border-top: 23px solid transparent; border-bottom: 23px solid transparent; border-right: 23px solid red; } .inner-triangle { position: relative; top: -20px; left: 2px; width: 0; height: 0; border-top: 20px solid transparent; border-bottom: 20px solid transparent; border-right: 20px solid blue; } <div class="triangle-left"> <div class="inner-triangle"></div> </div>
24th Mar 2019, 1:31 PM
Mohamed Nur Sahal
Mohamed Nur Sahal - avatar
+ 2
Use pseudo-element to achieve it. Check out the code https://code.sololearn.com/W103S0E6Nvls/?ref=app
24th Mar 2019, 3:10 PM
Calviղ
Calviղ - avatar
+ 1
Thanks for answers. I checked your answers, and they all work. And it helped me. But I had another question. Which of these solutions is effective for use in a group operation? I want the elements created once to move and transform easily, but not without destroying its internal structure.
25th Mar 2019, 2:52 AM
Алмат Айтбаев
Алмат Айтбаев - avatar
+ 1
Алмат Айтбаев just try out with some transforms, i think my code should work with any css transform.
25th Mar 2019, 3:45 AM
Calviղ
Calviղ - avatar
+ 1
OK. I understood you
25th Mar 2019, 4:10 AM
Алмат Айтбаев
Алмат Айтбаев - avatar