update code sample

This commit is contained in:
yuanchuan 2017-02-24 21:39:58 +08:00
parent 671f02a255
commit fef701a84b
1 changed files with 7 additions and 10 deletions

View File

@ -12,23 +12,20 @@
</head>
<body>
<div>
<css-doodle grid="8">
<css-doodle grid="5">
:host {
width: 100vw;
height: 100vw;
width: 50vh;
height: 50vh;
border-radius: 50%;
overflow: hidden;
background: #f1ffd9;
}
--size: @rand(200%);
width: var(--size);
height: var(--size);
background: hsla(@rand(100), 80%, 50%, @rand(.8));
border-radius: @rand(50%, 100%);
transform: translate(
@any(-50%, 50%),
@any(-50%, 50%)
);
border-radius: 50%;
</css-doodle>
</div>
</body>
</html>