Synchronise background position with padding

Developer
Size
3,411 Kb
Views
32,384

How do I make an synchronise background position with padding?

What is a synchronise background position with padding? How do you make a synchronise background position with padding? This script and codes were developed by Hugo Giraudel on 09 August 2022, Tuesday.

Synchronise background position with padding Previews

Synchronise background position with padding - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Synchronise background position with padding</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://prismjs.com/themes/prism.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Synchronise background position with padding</h1>
<pre class="language-css box"><code>.box { padding: 1.5em 2em;
}
</code></pre>
<pre class="language-css box box--manual"><code>/* Manual */
.box:nth-of-type(1) { background-position: top 1.5em right 2em;
}
</code></pre>
<pre class="language-css box box--automatic"><code>/* Automatic */
.box:nth-of-type(2) { background-position: top right; background-origin: content-box;
}
</code></pre> <script src='http://prismjs.com/prism.js'></script>
</body>
</html>

Synchronise background position with padding - Script Codes CSS Codes

pre.box { padding: 1.5em 2em;
}
pre.box--manual,
pre.box--automatic { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABpUlEQVRYR+2V4TEEQRCF30VABi4DMkAGRIAIEAEiQASIgAyQARmQARFQ39XMVV/ruZnZq8KP7T9bdbvd883rfn0T/XFMVjh/XdJlyj+V9DGk1lCALUk3kngSL5KO0rOLYwjAXjocBWygABAPPQS9AFeSjisH8A0taYpWAG57L2mnqar0JGm/ZS5aAOjzoyQvOSxITjAPPmjJbm0uagAnZtLtAe+SmAWGjwCS3m8EINS4LilXAsgWOwwSn9Ph3nbkALEd5Nymufhh1QjAW8zWu5B0nn4o7QHenwUQoVU9QMlin5JQI1ustgeow63Xala1ACWLvSbJ31IxQNiA0R7AfhxMTBPwZqDG3KoAUIgpz1vNfn8niSGid8vmwubYfpPDYQcBxMyqAFDcS5Utlm+zbC6iAff9RrXQqgB8uQreYiXJS87Kv3Mx25LQqh7AWqxV8hqIb8mCVS2AtViv5DUI35K5VfMMWIsNlbwG4VsysyoA2CVbjCJ+JmqFe99b60+jTfibABoBhihQ+wuvtXAhfwQYFRgV+JcK9O72lb6vLZWVirckfwPf2XItb8PuCwAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-size: 32px;
}
pre.box--manual { background-position: top 1.5em right 2em;
}
pre.box--automatic { background-position: top right; background-origin: content-box;
}
/* Demo styles */
pre.box { border: 4px solid #ccc; border-radius: 0.15em; margin: 1em auto;
}
body { font: 125% / 1.45 sans-serif; padding: 1em;
}
h1 { font-size: 1.2em; text-align: center;
}
pre > code { display: block;
}
pre.box--manual { border-color: tomato;
}
pre.box--automatic { border-color: forestgreen;
}
Synchronise background position with padding - Script Codes
Synchronise background position with padding - Script Codes
Home Page Home
Developer Hugo Giraudel
Username HugoGiraudel
Uploaded August 09, 2022
Rating 4.5
Size 3,411 Kb
Views 32,384
Do you need developer help for Synchronise background position with padding?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Hugo Giraudel (HugoGiraudel) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!