Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Jquery .CSS skew attribute

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44913
    Anonymous
    Inactive

    i know how to apply CSS styles with Jquery but how would be able to style CSS3 Skew? for example

    $(“div”).css(“-webkit-transform”:”skew(0deg)”);

    That doesnt work and it’s because of the parenthesis. But how would i write it then? and i know that’s for multiple elements. I just wrote it like that because that’s what im doing.

    #135825
    CrocoDillon
    Participant

    , instead of :

    $(“div”).css(“-webkit-transform”, “skew(10deg)”);

    or Object syntax

    $(“div”).css({webkitTransform: “skew(10deg)”});

    `$(‘div’).css(“webkitTransform”, “skew(10deg)”);` also works, or this:

    $(‘div’).each(function() {
    this.style.webkitTransform = ‘skew(10deg)’;
    });

    or without jQuery

    var divs = document.getElementsByTagName(‘div’);
    for (var i = 0; i < divs.length; i++) {
    divs.style.webkitTransform = ‘skew(10deg)’;
    }

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.