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.
<ul class="jp_map">
<li>
<a href="#">北海道</a></li>
<li>
<a href="#">青森県</a></li>
<li>
<a href="#">岩手県</a></li>
<li>
<a href="#">宮城県</a></li>
<li>
<a href="#">秋田県</a></li>
<li>
<a href="#">山形県</a></li>
<li>
<a href="#">福島県</a></li>
<li>
<a href="#">茨城県</a></li>
<li>
<a href="#">栃木県</a></li>
<li>
<a href="#">群馬県</a></li>
<li>
<a href="#">埼玉県</a></li>
<li>
<a href="#">千葉県</a></li>
<li>
<a href="#">東京都</a></li>
<li>
<a href="#">神奈川県</a></li>
<li>
<a href="#">新潟県</a></li>
<li>
<a href="#">富山県</a></li>
<li>
<a href="#">石川県</a></li>
<li>
<a href="#">福井県</a></li>
<li>
<a href="#">山梨県</a></li>
<li>
<a href="#">長野県</a></li>
<li>
<a href="#">岐阜県</a></li>
<li>
<a href="#">静岡県</a></li>
<li>
<a href="#">愛知県</a></li>
<li>
<a href="#">三重県</a></li>
<li>
<a href="#">滋賀県</a></li>
<li>
<a href="#">京都府</a></li>
<li>
<a href="#">大阪府</a></li>
<li>
<a href="#">兵庫県</a></li>
<li>
<a href="#">奈良県</a></li>
<li>
<a href="#">和歌山県</a></li>
<li>
<a href="#">鳥取県</a></li>
<li>
<a href="#">島根県</a></li>
<li>
<a href="#">岡山県</a></li>
<li>
<a href="#">広島県</a></li>
<li>
<a href="#">山口県</a></li>
<li>
<a href="#">徳島県</a></li>
<li>
<a href="#">香川県</a></li>
<li>
<a href="#">愛媛県</a></li>
<li>
<a href="#">高知県</a></li>
<li>
<a href="#">福岡県</a></li>
<li>
<a href="#">佐賀県</a></li>
<li>
<a href="#">長崎県</a></li>
<li>
<a href="#">熊本県</a></li>
<li>
<a href="#">大分県</a></li>
<li>
<a href="#">宮崎県</a></li>
<li>
<a href="#">鹿児島県</a></li>
<li>
<a href="#">沖縄県</a></li>
</ul>
ul.jp_map {
position: relative;
list-style-type: none;
padding: 84% 0 0;
margin: 0;
border: solid 1px #000000;
box-sizing: border-box;
}
.jp_map li {
width: 7%;
height: 10%;
background-color: aqua;
border: solid #ffffff 2px;
box-sizing: border-box;
}
.jp_map li:nth-child(1) {
position: absolute;
top: 0;
left: 85%;
width: 15%;
}
.jp_map li:nth-child(2) {
position: absolute;
top: 11%;
left: 85%;
width: 14%;
height: 5.5%;
}
.jp_map li:nth-child(3) {
position: absolute;
top: 16.5%;
left: 92%;
}
.jp_map li:nth-child(4) {
position: absolute;
top: 26.5%;
left: 92%;
}
.jp_map li:nth-child(5) {
position: absolute;
top: 16.5%;
left: 85%;
}
.jp_map li:nth-child(6) {
position: absolute;
top: 26.5%;
left: 85%;
}
.jp_map li:nth-child(7) {
position: absolute;
top: 36.5%;
left: 92%;
}
.jp_map li:nth-child(8) {
position: absolute;
top: 46.5%;
left: 92%;
}
.jp_map li:nth-child(9) {
position: absolute;
top: 46.5%;
left: 85%;
}
.jp_map li:nth-child(10) {
position: absolute;
top: 46.5%;
left: 78%;
}
.jp_map li:nth-child(11) {
position: absolute;
top: 56.5%;
left: 85%;
}
.jp_map li:nth-child(12) {
position: absolute;
top: 56.5%;
left: 92%;
}
.jp_map li:nth-child(13) {
left: 85%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(14) {
left: 78%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(15) {
position: absolute;
top: 36.5%;
left: 78%;
width: 14%;
}
.jp_map li:nth-child(16) {
position: absolute;
top: 36.5%;
left: 71%;
}
.jp_map li:nth-child(17) {
position: absolute;
top: 36.5%;
left: 64%;
}
.jp_map li:nth-child(18) {
left: 64%;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(19) {
position: absolute;
top: 56.5%;
left: 78%;
}
.jp_map li:nth-child(20) {
left: 71%;
position: absolute;
top: 46.5%;
height: 20%;
}
.jp_map li:nth-child(21) {
left: 64%;
position: absolute;
top: 56.5%;
}
.jp_map li:nth-child(22) {
left: 71%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(23) {
left: 64%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(24) {
left: 57%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(25) {
left: 57%;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(26) {
left: 50%;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(27) {
left: 50%;
position: absolute;
top: 56.5%;
}
.jp_map li:nth-child(28) {
left: 43%;
position: absolute;
top: 46.5%;
height: 20%;
}
.jp_map li:nth-child(29) {
left: 57%;
position: absolute;
top: 56.5%;
}
.jp_map li:nth-child(30) {
left: 50%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(31) {
left: 36%;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(32) {
left: 29%;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(33) {
left: 36%;
position: absolute;
top: 56.5%;
}
.jp_map li:nth-child(34) {
left: 29%;
position: absolute;
top: 56.5%;
}
.jp_map li:nth-child(35) {
left: 22%;
position: absolute;
top: 51.5%;
}
.jp_map li:nth-child(36) {
left: 36%;
position: absolute;
top: 78.5%;
}
.jp_map li:nth-child(37) {
left: 36%;
position: absolute;
top: 68.5%;
}
.jp_map li:nth-child(38) {
left: 29%;
position: absolute;
top: 68.5%;
}
.jp_map li:nth-child(39) {
left: 29%;
position: absolute;
top: 78.5%;
}
.jp_map li:nth-child(40) {
left: 14%;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(41) {
left: 7%;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(42) {
left: 0;
position: absolute;
top: 46.5%;
}
.jp_map li:nth-child(43) {
left: 7%;
position: absolute;
top: 56.5%;
}
.jp_map li:nth-child(44) {
left: 14%;
position: absolute;
top: 56.5%;
}
.jp_map li:nth-child(45) {
left: 14%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(46) {
left: 7%;
position: absolute;
top: 66.5%;
}
.jp_map li:nth-child(47) {
left: 0;
position: absolute;
top: 76.5%;
}
Also see: Tab Triggers