Orientation for div

Is there any way to change orientation for a div using css .

those. i need to display a div at a slash position.

Is there a way i can define the four corners of a div

(x1, y1) , (x2, y2) , (x3, y3) and (x4, y4)

Edit

Is there a way to do this using javascript or C # ??

Is there a way to change the orientation of the image and not the div?

+1


a source to share


4 answers


I only needed to do it in IE and I used a matrix filter and set values ​​for M11 , M12 , M21 and M22 .



<style>
      .SlantingDiv { padding: 2px; filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',M11=1.0,M12=0.4,M21=-0.2,M22=1.0); width: 60; height: 60; padding: 6px; border: #a9a9a9 1px solid }
</style>

<div class="SlantingDiv">
       Slanting Text or Image
</div>

      

0


a source


It's impossible.

You need to either use an image or VML / SVG



Note that IE does not support SVG, and other browsers do not support VML, but there is an SVG wrapper for VML. Check Google

+2


a source


Not possible with pure css, you need to use something else like svg, flash or silverlight. Svg will also allow you to insert arbitrary divs into it, so they will rotate as you want, but svg is not supported in IE, but this feature was quite slow when I last tested it.

+1


a source


Can you always use border skins ?

Slates allow you to draw rectangles at the corners, but they do not allow text to be placed at an angle.

0


a source







All Articles