Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
This kind of thing is easily done with clip-path .
Example.
Generator.
can-i-use ( IE and Edge users in transit)
In order to see a triangle in the developer panel, you will have to write your own render engine with your own specifications. This Wishlist is not worth such a colossal work.
Perhaps, for your task, the option of using a png image with transparency is suitable. And, Andrey
's
version is a great and cross-browser solution.
so that when you hover from the developer panel, there is a triangle, and not a triangle in a square
<svg><path id="p1" d="M10,100L100,10L190,100Z" fill="#00f"/></svg>
<script type="text/javascript">
var p1 = document.getElementById('p1');
p1.onmouseover = function(e)
{
this.setAttribute('fill', '#0f0')
}
p1.onmouseout = function(e)
{
this.setAttribute('fill', '#00f')
}
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question