CSS Pre-Block Overflow example

Developer
Size
2,482 Kb
Views
24,288

How do I make an css pre-block overflow example?

What is a css pre-block overflow example? How do you make a css pre-block overflow example? This script and codes were developed by Kevin Gimbel on 11 August 2022, Thursday.

CSS Pre-Block Overflow example Previews

CSS Pre-Block Overflow example - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Pre-Block Overflow example</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ * { margin: 0; padding: 0; position: relative;
}
pre { width: 100%; max-width: 30em; margin: 2.5em auto; background: #222222; color: #fff; overflow-x: scroll; color: #fff;
}
pre:after { content: attr(data-title); position: absolute; top: 0; right: 0; padding: .7em 1.4em; background: #85c226; color: #222222; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4); font-weight: bold;
}
::-webkit-scrollbar { background: #222222; height: 8px;
}
::-webkit-scrollbar-thumb { background: #858585;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <pre data-title="HTML"> <code> &lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" href="assets/css/style.css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Code block, yeah!&lt;/h1&gt; &lt;/body&gt; &lt;/html&gt; </code>
</pre>
</body>
</html>

CSS Pre-Block Overflow example - Script Codes CSS Codes

* { margin: 0; padding: 0; position: relative;
}
pre { width: 100%; max-width: 30em; margin: 2.5em auto; background: #222222; color: #fff; overflow-x: scroll; color: #fff;
}
pre:after { content: attr(data-title); position: absolute; top: 0; right: 0; padding: .7em 1.4em; background: #85c226; color: #222222; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4); font-weight: bold;
}
::-webkit-scrollbar { background: #222222; height: 8px;
}
::-webkit-scrollbar-thumb { background: #858585;
}
CSS Pre-Block Overflow example - Script Codes
CSS Pre-Block Overflow example - Script Codes
Home Page Home
Developer Kevin Gimbel
Username kevingimbel
Uploaded August 11, 2022
Rating 3.5
Size 2,482 Kb
Views 24,288
Do you need developer help for CSS Pre-Block Overflow example?

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!

Kevin Gimbel (kevingimbel) Script Codes
Create amazing blog posts 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!