Liveweave: Generative AI Web Editor & HTML/CSS/JS Playground
Initializing
Liveweave
Web
expand_more
home
Home
Palette
Color Explorer
arrow_outward
Polyline
Graphics Editor
arrow_outward
frame_source
Python Playground
arrow_outward
build
Tools
expand_more
restart_alt
Load "Hello Weaver!"
post_add
Generate Lorem ipsum...
code
Format HTML
code_blocks
Format CSS
data_object
Format JavaScript
library_add
Library
expand_more
A
Algolia JS
Animate CSS
Apex Charts JS
B
Bulma CSS
Bootstrap
C
Chart JS
Chartist
Create JS
D
D3
Dojo
F
Foundation
Fullpage JS
G
Granim JS
Google Charts
H
Halfmoon
J
jQuery
M
Materialize
Moment JS
Masonry JS
Milligram CSS
P
Pure CSS
Primer CSS
Popper JS
Pattern CSS
Picnic CSS
R
React JS
Raphael JS
Raisin CSS
S
Semantic UI
Skeleton CSS
Spectre CSS
Tachyons CSS
T
Tailwind
Three JS
U
UI Kit
Vis JS
W
Water CSS
download
Download
expand_more
developer_mode
Download as HTML
folder_zip
Download as .ZIP
cloud_upload
Fork
account_circle
Login
settings
Settings
expand_more
Editor font
14
px
A
A
Line number
Mini map
Word wrap
sync_alt
Reset Settings
smart_display
Run
left_panel_close
AI Assistant
dashboard
All
HTML
CSS
JS
visibility
Preview
bolt
Live Preview
terminal
JS Console
<!DOCTYPE html> <html> <head> <title>Rotating Lollipop in CSS</title> <!-- Author: https://css-shape.com/lollipop/ --> </head> <body> <!-- Start your code here --> <div class="lollipop"></div> <!-- End your code here --> </body> </html>
body { background-color: lightpink; display: flex; justify-content: center; align-items: center; height: 100vh; } /* HTML: <div class="lollipop"></div> */ .lollipop { --r: 150px; /* control the size */ --c1: #fd99d7; --c2: #4e4cb0; height: calc(2* var(--r)); aspect-ratio: 1; clip-path: circle(); /* Adding continuous rotation */ animation: rotate 5s linear infinite; display:flex; } .lollipop:before, .lollipop:after { content: ""; flex: 1; --g1: radial-gradient(50% 50%, var(--c1) 99%, #0000) no-repeat; --g2: radial-gradient(50% 50%, var(--c2) 99%, #0000) no-repeat; background: var(--g1) calc(sin(60deg)* var(--r)) calc(var(--r) / -2), var(--g2) calc(var(--r) / 2) calc(sin(-60deg)* var(--r)), var(--g1) 0 calc(-1* var(--r)), var(--g2) calc(var(--r) / -2) calc(sin(-60deg)* var(--r)), var(--g1) calc(sin(-60deg)* var(--r)) calc(var(--r) / -2), var(--g2) calc(-1* var(--r)) 0, var(--g1) calc(sin(-60deg)* var(--r)) calc(var(--r) / 2); background-size: 200%; } .lollipop:after { rotate: 180deg; } /* Defining the rotation animation */ @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
// Write JavaScript here
terminal
JavaScript Console
Preview
Clear
close
›
Run