repeating-radial-gradient()



значения функции:


  • degree
  • position
  • form
  • size
  • color, color



css/style.css
  • * {
  •  margin: 0;
  •  padding: 0;
  • }
  •  
  • .main {
  •  height: 600px;
  •  width: 900px;
  •  position: absolute;
  •  top: 50%;
  •  left: 50%;
  •  margin-top: -300px;
  •  margin-left: -450px;
  • }
  •  
  • .wrapper {
  •  width: 25%;
  •  height: 100%;
  •  float: left;
  • }
  •  
  • #div1, #div2, #div3, #div4 {
  •  height: 200px;
  •  width: 200px;
  •  float: left;
  •  position: relative;
  •  top: 50%;
  •  left: 50%;
  •  margin-top: -100px;
  •  margin-left: -100px;
  • }
  •  
  • #div1 {
  •  background: repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
  •  background: -moz-repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
  •  background: -o-repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
  •  background: -repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
  •  background: -ms-repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
  • }
  •  
  • #div4 {
  •  background: repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
  •  background: -moz-repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
  •  background: -o-repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
  •  background: -repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
  •  background: -ms-repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
  • }
* {
 margin: 0;
 padding: 0;
}

.main {
 height: 600px;
 width: 900px;
 position: absolute;
 top: 50%;
 left: 50%;
 margin-top: -300px;
 margin-left: -450px;
}

.wrapper {
 width: 25%;
 height: 100%;
 float: left;
}

#div1, #div2, #div3, #div4 {
 height: 200px;
 width: 200px;
 float: left;
 position: relative;
 top: 50%;
 left: 50%;
 margin-top: -100px;
 margin-left: -100px;
} 

#div1 {
 background: repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
 background: -moz-repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
 background: -o-repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
 background: -repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
 background: -ms-repeating-radial-gradient(circle, #FFF 20%, #0000FF 60%);
}

#div4 {
 background: repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
 background: -moz-repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
 background: -o-repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
 background: -repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
 background: -ms-repeating-radial-gradient(right bottom, circle, #FFF 5%, #0000FF 15%, #FFFF00 20%);
}


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <div class="main">
  •   <div class="wrapper">
  •    <div id="div1"></div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div2"></div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div3"></div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div4"></div>
  •   </div>
  •  </div>
  • <script>
  •  /*JavaScript*/
  •  document.getElementById("div2").style.background="repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-moz-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-o-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-webkit-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-ms-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  /*jQuery*/
  •  $(document).ready(function() {
  •   $("#div3").css({ "background": "repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-moz-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-o-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-webkit-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-ms-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •  });
  • </script>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <div class="main">
  •   <div class="wrapper">
  •    <div id="div1"></div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div2"></div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div3"></div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div4"></div>
  •   </div>
  •  </div>
  • <script>
  •  /*JavaScript*/
  •  document.getElementById("div2").style.background="repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-moz-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-o-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-webkit-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  document.getElementById("div2").style.background="-ms-repeating-radial-gradient(left top, circle, #FFF 10%, #0000FF 30%)";
  •  /*jQuery*/
  •  $(document).ready(function() {
  •   $("#div3").css({ "background": "repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-moz-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-o-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-webkit-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •   $("#div3").css({ "background": "-ms-repeating-radial-gradient(circle, #FFF 5%, #0000FF 10%, #CCFFFF 15%)" });
  •  });
  • </script>
  • </body>
  • </html>