HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="titles">
<div class="title">
<div class="bg" style="background-image: url(https://secure.syndetics.com/index.php?isbn=/MC.jpg&oclc=&upc=733961249118&client=richlandlib);"></div>
<div class="content">
<div class="cover" style="background-image: url(https://secure.syndetics.com/index.php?isbn=/MC.jpg&oclc=&upc=733961249118&client=richlandlib);"></div>
<p>When the founding fathers drew the first map of America, they confronted many of the same challenges that unite and divide us today. HOW THE STATES GOT THEIR SHAPES explores how our borders evolved--and continue to change--in response to religion, transportation, communication, politics, culture clashes and even Mother Nature. This is no textbook-style documentary series. Local experts and everyday folks lead host Brian Unger, a journalist and former Daily Show correspondent, to insights about some of America s most baffling questions. How are flying fish threatening to re-draw the shape of Illinois? What does the use of cell phones by Pennsylvania s Amish have to do with the shape of their state? How is the phrase sold down the river linked to the shape of what might be our 51st state? Why did the invention of air conditioning change how America picks its Presidents? Unger uncovers the answers, hidden in our map. BONUS FEATURES: Feature-length HISTORY Special How The States Got Their Shapes DISC 1: A River Runs Through It / The Great Plains, Trains, & Automobiles / Force of Nature / State of Rebellion DISC 2: Living on the Edge / Use it Or Lose It / Church and States / A Boom With A View DISC 3: Culture Clash / Mouthing Off DISC 4: Bonus Special: How the States Got Their Shapes</p>
</div>
</div>
<div class="title">
<div class="bg" style="background-image: url(https://secure.syndetics.com/index.php?isbn=/MC.jpg&oclc=&upc=018713609144&client=richlandlib);"></div>
<div class="content">
<div class="cover" style="background-image: url(https://secure.syndetics.com/index.php?isbn=/MC.jpg&oclc=&upc=018713609144&client=richlandlib);"></div>
<p>North America: where civilization collides with untamed wilderness. Just feet beyond our own back yards rages a spectacle we rarely see. Join us as we step into this hidden world teaming with life - across impossible mountains and endless deserts. Dive into unexplored forests and crash into rugged coasts. Unforgiving, brutal, yet achingly beautiful. This vast continent offers boundless rewards for those brave enough to take on this land - and call her home.</p>
</div>
</div>
<div class="title">
<div class="bg" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9781502605924/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<div class="content">
<div class="cover" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9781502605924/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<p>China is one of the worlds oldest civilizations. This book covers many areas of China, such as its history, geography, government, traditions, and favorite foods. It gives readers a unique perspective on the country and its culture, and presents it in a way that is easy to read. </p>
</div>
</div>
<div class="title">
<div class="bg" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9781617831072/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<div class="content">
<div class="cover" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9781617831072/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<p>Explore diverse landscapes, travel back in time, and discover unique populations, all without leaving your chair! Start your international tour in China, land of the Forbidden City, the Yangtze River, the Great Wall of China, more than 1 billion people, and so much more. This colorful, informative book introduces Chinas history, geography, culture, climate, government, economy, and other significant features. Sidebars, maps, fact pages, a glossary, a timeline, historic images and full-color photos, and well-placed graphs and charts enhance this engaging title. Countries of the World is a series in Essential Library, an imprint of ABDO Publishing Company.</p>
</div>
</div>
<div class="title">
<div class="bg" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9780802779137/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<div class="content">
<div class="cover" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9780802779137/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<p>Deborah Fallows has spent much of her life learning languages and traveling around the world. But nothing prepared her for the surprises of learning Mandarin, China's most common language, or the intensity of living in Shanghai and Beijing. Over time, she realized that her struggles and triumphs in studying the language of her adopted home provided small clues to deciphering the behavior and habits of its people,and its culture's conundrums. As her skill with Mandarin increased, bits of the language―a word, a phrase, an oddity of grammar―became windows into understanding romance, humor, protocol, relationships, and the overflowing humanity of modern China.Fallows learned, for example, that the abrupt, blunt way of speaking that Chinese people sometimes use isn't rudeness, but is, in fact, a way to acknowledge and honor the closeness between two friends. She learned that English speakers' trouble with hearing or saying tones―the variations in inflection that can change a word's meaning―is matched by Chinese speakers' inability not to hear tones, or to even take a guess at understanding what might have been meant when foreigners misuse them.In sharing what she discovered about Mandarin, and how those discoveries helped her understand a culture that had at first seemed impenetrable, Deborah Fallows's Dreaming in Chinese opens up China to Westerners more completely, perhaps, than it has ever been before.</p>
</div>
</div>
<div class="title">
<div class="bg" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9780531236758/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<div class="content">
<div class="cover" style="background-image: url(https://secure.syndetics.com/index.php?isbn=9780531236758/MC.jpg&oclc=&upc=&client=richlandlib);"></div>
<p>The nation of Brazil occupies a full half of South Americas land, ranging from the dense jungle of the Amazon rain forest in the north to the rugged coastline of the Atlantic Ocean in the east. In between, around two hundred million people live throughout the nations cities, towns, and villages. Readers will get a close look at this incredible nation, from its beautiful rural landscapes to its massive cities, such as Sao Paulo and Rio de Janeiro. They will get a chance to sample Brazils culture and cuisine while also learning about its economy and history.</p>
</div>
</div>
</div>
<br><a href="http://www.richlandlibrary.com/inform/geography-research-guide">Original page</a>
<br><a href="http://stackoverflow.com/questions/26889358/generate-color-palette-from-image-with-imagemagick#26916896">See also this SO post about deriving color pallete from an image</a>
*{
margin:0;
box-sizing:border-box;
}
body{
margin:0;
font-size:16px;
font-family:Helvetica;
}
.titles{
display:flex;
flex-flow:row wrap;
}
.title{
color:white;
position:relative;
min-width:22em;
flex-grow: 1;
height:14em;
overflow:hidden;
}
.title > *{
position:absolute;
top:0;
}
.content{
display:flex;
height:100%;
padding:1em;
flex-direction: row;
}
.content .cover{
flex:39;
text-align:center;
background-size:contain;
background-repeat:no-repeat;
background-position:50% 0;
margin:0 1em;
}
.content p{
flex:61;
line-height: 1em;
overflow:hidden;
opacity:0.75;
}
.bg{
background-color:#333;
background-size:6000%;
background-repeat:no-repeat;
/* background-position:5% 61.8%; */
background-position:50% 60.8%;
margin:-10% 0 0 -10%;
width:120%;
height:160%;
filter:blur(24px);
}
.title:last-child:nth-child(odd):after {
display:block;
flex:2;
content:'testing!!!';
border:solid 2px orange;
background-color:red;
}
Also see: Tab Triggers