Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to draw a diagonal line using CSS3?

Tags:

css

I know that is possible to create a circle using CSS3

Is it possible to draw a diagonal?

like image 484
alexchenco Avatar asked Dec 27 '10 11:12

alexchenco


Video Answer


1 Answers

yes it is, there is more then one possibility:

You could use a hr element or a other element and rotate it. Here is a demo:

And yes it works in IE to :)

http://jsfiddle.net/LqFAX/

   -moz-transform: rotate(7.5deg);  
     -o-transform: rotate(7.5deg);  
-webkit-transform: rotate(7.5deg);  
    -ms-transform: rotate(7.5deg);  
        transform: rotate(7.5deg);  
           filter:  progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',  
                  M11=0.9914448613738104, M12=-0.13052619222005157,M21=0.13052619222005157, M22=0.9914448613738104);
     -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.9914448613738104, M12=-0.13052619222005157, M21=0.13052619222005157, M22=0.9914448613738104,sizingMethod='auto expand')";

             zoom: 1;
like image 96
meo Avatar answered Oct 09 '22 11:10

meo