SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Converting This Radial Gradient to Other Browsers?

    I'm very confused here.. but what I'm trying to do is convert

    This:
    Code CSS:
    background: -moz-radial-gradient(50% 50%, transparent 0%, transparent 60%, rgba(0,0,0,0.8) 100%);

    So that it works in: Old browsers, FF3.6+, Chrome / Safari4+, Chrome10+,Safari5.1+, Opera 12+, IE10+, and W3C.

    I'm not sure if thats all the browsers I have to consider, but I got the name of the browsers from the code below.


    Code CSS:
    background: rgb(30,87,153); /* Old browsers */
    background: -moz-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%, rgba(41,137,216,1) 50%, rgba(32,124,202,1) 51%, rgba(125,185,232,1) 100%); /* FF3.6+ */
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(30,87,153,1)), color-stop(50%,rgba(41,137,216,1)), color-stop(51%,rgba(32,124,202,1)), color-stop(100%,rgba(125,185,232,1))); /* Chrome,Safari4+ */
    background: -webkit-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* Opera 12+ */
    background: -ms-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* IE10+ */
    background: radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */


    How would this even be done?

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,191
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Have a look at the following tool, it's simple to use and requires on the W3C syntax for conversions.

    http://leaverou.me/demos/cssgradientsplease/

    If your on a mac an easier way would be to grab the Gradient app which is simple, small and very efficient when working with cross browser syntax.

    http://www.gradientapp.com/

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SgtLegend View Post
    Have a look at the following tool, it's simple to use and requires on the W3C syntax for conversions.

    http://leaverou.me/demos/cssgradientsplease/

    If your on a mac an easier way would be to grab the Gradient app which is simple, small and very efficient when working with cross browser syntax.

    http://www.gradientapp.com/

    the first link doesnt do radial gradients, and the gradient app works great but it darkens the whole gradient.. I'm not sure what its called in the code I pasted, but the part that says transparent 60% is the opening in the middle of the browser so its not affected by the gradient. How do I add that to the radial gradients created with the gradientapp? or is there another way to convert other than the first link?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •