CSS Battle #130 – Letter O #1396
meg-gutshall
started this conversation in
CSS Battles
Replies: 6 comments
-
Code Source – 632.93 {262}Box shadows can be inset and they are inside the borders! <div w></div>
<style>
body {background:#926927}
[w] {
position: fixed;
left:160px;
top:70px;
width: 60;
height: 120;
border: 20px solid #fff;
border-radius: 30px;
box-shadow:-20px 0 #6D480A, -20px 0 #6D480A inset;
}
</style> |
Beta Was this translation helpful? Give feedback.
0 replies
-
Code Source – 637.27 {249}drop-shadow filter is even better for this use-case! <div w></div>
<style>
body {background:#926927}
[w] {
position: fixed;
left:160px;
top:70px;
width: 60;
height: 120;
border: 20px solid #fff;
border-radius: 30px;
filter: drop-shadow(-20px 0 #6D480A);
}
</style> |
Beta Was this translation helpful? Give feedback.
0 replies
-
Code Source – 606.64 {430}<div>
<div m></div>
</div>
<style>
body {
background: #926927;
}
body, div {
display: grid;
place-items: center;
}
div {
width: 100;
height: 160;
background: #FFFFFF;
border-radius: 30px;
box-shadow: -20px 0 #6D480A;
translate: 10px;
}
[m] {
width: 40;
height: 120;
background: #926927;
border-radius: 10px;
rotate: 180deg;
translate: -10px;
}
</style> |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Code source |
Beta Was this translation helpful? Give feedback.
0 replies
-
First attempt – 640.23 {241}<div></div>
<style>
body {
background: #926927;
margin: 70 160;
}
div {
width: 60;
height: 120;
border: 20px solid #fff;
border-radius: 30px;
box-shadow: #6D480A -20px 0, #6D480A -20px 0 inset;
}
</style>Refactored and minified! – 689.58 {157}<p><style>body{background:#926927;margin:70 160;}p{width:60;height:120;border:5vw solid#fff;border-radius:30px;box-shadow:#6D480A -5vw 0,#6D480A -5vw 0 inset |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Minified! Code Source – 726.24 {121}<style>&{background:#926927;margin:62 33%62 152;*{border:solid+22q#fff;border-radius:32q;filter:drop-shadow(-21q+0#6D480A |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Link to battle:
Let's battle! ⚔️
Copy the code block below to format your comment on the discussion thread:
What others will see:
This will result in a nice hidden bit like so:
Code Source – score {characters}
Beta Was this translation helpful? Give feedback.
All reactions