How to draw diagonal line in HTML5

2 Answers

0 votes
<!DOCTYPE html>
<html>
<head>
</head>
<body>

<svg style='width: 200px; height: 200px;'>
    <line x1="0" y1="0" x2="300" y2="300"
        style="stroke:rgb(255, 0, 0);stroke-width:2"/>
</svg>

</body>
</html>

 



answered May 27, 2016 by avibootz
0 votes
<!DOCTYPE html>
<html>
<head>
</head>
<body>

<svg style='width: 100%; height: 100%;'>
    <line x1="0" y1="0" x2="100%" y2="100%"
        style="stroke:rgb(0, 255, 0);stroke-width:2"/>
</svg>

</body>
</html>

 



answered May 27, 2016 by avibootz

Related questions

1 answer 313 views
1 answer 552 views
1 answer 373 views
373 views asked May 20, 2014 by avibootz
...