Вход Регистрация
Файл: documentation/examples/configure-bounds.html
Строк: 13
<?php
<html>
  <
head>
    <
script type="text/javascript" src="../assets/jquery.js"></script>
    <
script type="text/javascript" src="../../jcolor.js"></script>
    <
link rel="stylesheet" type="text/css" href="../../jcolor.css">
    <
style type="text/css">
    .
my-container {
      
position: relative;
      
width: 400px;
      
height: 150px;
      
border: 1px solid gray;
    }
    .
color-picker {
      
position: absolute;
      
right: 10px;
      
bottom: 10px;
    }
    </
style>
  </
head>
  <
body>
    <
div class="my-container">
      <
div class="color-picker"></div>
    </
div>
    <
script>
      $(
'.color-picker').colorpicker({
        
color: { r: 0.3, g: 0.75, b: 0.72, a: 0.5 },
        
boundingElement: $('.my-container'),
      });
    </
script>
  </
body>
</
html>
?>
Онлайн: 2
Реклама