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.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Gallery</title>
<link href="CssArt.css"rel="stylesheet">
</head>
<body>
<div id="container">
<div id="back_wall">
<div id="window">
<div id="rail">
<div class="rail_holder" id="left_rail_holder"></div>
<div id="mid"></div>
<div class="rail_holder" id="right_rail_holder"></div>
</div>
<div id="inner_window">
<div id="left_pane">
<div class="inner_window_knob" id="left_pane_window_knob">
<p class="poster_message" id="left_pane_message">place poster here</p>
<div class="pane_knob_holder" id="left_pane_knob_holder"></div>
</div>
</div>
<div id="right_pane">
<div class="inner_window_knob" id="right_pane_window_knob">
<!-- default message remove later -->
<p class="poster_message" id="right_pane_message">place poster here</p>
<div class="pane_knob_holder"id="right_pane_knob_holder"></div>
</div>
</div>
</div>
</div>
<!-- <div class="top_lamp"id="top_lamp_left">
<div class="top_lamp_mid"></div>
<div class="top_lamp_bottom"></div>
</div> -->
<div class="top_lamp"id="top_lamp_center">
<div class="top_lamp_mid"></div>
<div id="top_lamp_center_holder"></div>
<div id="top_lamp_center_bottom">
<div class="top_lamp_switch" id="top_lamp_center_switch"></div>
</div>
</div>
<div class="top_lamp"id="top_lamp_right">
<div class="top_lamp_mid"></div>
<div class="top_lamp_bottom">
<div class="top_lamp_switch" id="top_lamp_right_switch"></div>
</div>
</div>
<div class="poster" id="poster_naruto">
<div class="poster_nail"></div>
<p class="poster_message">place poster here</p>
<img src="images/posters/images (33).jpeg" id="image_naruto">
</div>
<div class="poster"id="poster_hashnode">
<div class="poster_nail"></div>
<div id="hashnode_image"></div>
</div>
</div>
<div id="floor">
<div id="stool">
<div class="stool_area" id="upper_stool_area"></div>
<div class="stool_area" id="mid_stool_area"></div>
<div id="lower_stool_area"></div>
<div class="stool_legs" id="left_stool_leg"></div>
<div class="stool_legs" id="right_stool_leg"></div>
</div>
<!-- <div class="full_drawer"id="full_drawer_left">
<div class="small_drawer"> <div class="knob"></div></div>
<div class="small_drawer"> <div class="knob"></div></div>
<div class="small_drawer"> <div class="knob"></div></div>
<div class="stand" id="stand_left"></div>
</div> -->
<div id="bed">
<div id="bed_head">
<div class="side_head" id="left_head"></div>
<div class="center_head_zone">
<div class=" center_head" id="center_head1"></div>
<div class=" center_head" id="center_head2"></div>
<div class=" center_head" id="center_head3"></div>
</div>
<div class="side_head" id="right_head"></div>
</div>
<div id="bed_upper"></div>
<div class="bed_legs" id="left_leg"></div>
<div class="bed_legs" id="right_leg"></div>
<div id="pillow"></div>
</div>
<div class="full_drawer"id="full_drawer_right">
<div class="small_drawer"> <div class="knob"></div></div>
<div class="small_drawer"> <div class="knob"></div></div>
<div class="small_drawer"> <div class="knob"></div></div>
<div class="stand" id="stand_right"></div>
</div>
<div class="lamp" id="lamp_left">
<div class="lamp-top"></div>
<div class="lamp-mid"></div>
<div class="lamp-bottom">
<div class="lamp_switch" id="lamp_left_switch"></div>
</div>
</div>
<div class="lamp" id="lamp_right">
<div class="lamp-top"></div>
<div class="lamp-mid"></div>
<div class="lamp-bottom">
<div class="lamp_switch" id="lamp_right_switch"></div>
</div>
</div>
<div id="vase">
<div class="flower"id="flower1"></div>
<div class="flower"id="flower2"></div>
<div class="flower"id="flower3"></div>
</div>
<div class="small_vase1"id="small_vase_left">
<div class="small_top"></div>
</div>
<div class="small_vase1"id="small_vase_right">
<div class="small_top"></div>
</div>
</div>
</div>
</div>
</body>
</html>
html{
box-sizing: border-box;
}
body{
padding:120px;
background-color: black;
}
/*/////////////////div containing the whole rom//////////////////*/
#container{
width:100%;
display: grid;
height:500px;
overflow: hidden;
grid-template-areas:
"back "
"floor";
grid-template-rows:70% 30% ;
grid-template-columns:1fr;
border: 1px solid ;
}
/*/////////////////back wall//////////////////*/
#back_wall{
display: flex;
grid-area: back;
padding-left:20px;
flex-direction: row;
position: relative;
justify-content:flex-start;
background:linear-gradient(to right,#fc5c7d,#6a82fb);
/* background:linear-gradient(to right,#00b4db,#0083b0); */
border-bottom: 10px solid white;
}
/*/////////////////back wall posters//////////////////*/
#floor,
body,
#window,
.full_drawer,
div[class="small_drawer"],
.lamp,
.top_lamp,
#poster_hashnode,
#hashnode_image{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.poster{
font:14pt bold;
width:95px;
height:110px;
position: absolute;
text-align: center;
border:2px solid black;
}
#poster_naruto{
z-index:1;
top:60px;
left:760px;
}
#poster_hashnode{
top:60px;
left:470px;
background-color: white;
}
#hashnode_image{
width:75px;
height:75px;
background:#2a62ff;
border-radius:25%;
transform-origin: center;
transform:rotateZ(45deg);
}
#hashnode_image::after{
content: '';
width:30%;
height:30%;
background:white;
border-radius: 50% 50%;
}
/* default poster message */
.poster_message{
top:-8%;
left:20%;
font:12pt bold;
position: absolute;
}
.poster_message::after{
content:':):):)';
}
.poster_nail{
top:0;
left:50%;
width:5px;
height: 5px;
z-index: 7;
position: absolute;
border-radius: 50% 50%;
background-color:black;
}
#image_naruto{
z-index:4;
width:100%;
height:100%;
}
/*/////////////////window area including the rails and panes//////////////////*/
#window{
width:52%;
height:90%;
margin-top:-25px;
}
/*/////////////////curtain rail//////////////////*/
#rail{
width:95%;
height:30%;
background-color: inherit;
}
.rail_holder{
width:35px ;
height:35px;
border-radius:50% 50%;
border:1px solid black;
background-image: linear-gradient(to bottom,rgb(218, 218, 148),yellow 35%,white);
}
#rail,
#inner_window{
display:flex;
justify-content: center;
align-items: center;
}
/* #left_hold{
} */
#mid{
width:85% ;
height:15px;
border-radius:50px;
background-image: linear-gradient(to bottom,rgb(73, 73, 64),yellow 35%,white);
}
/* #right_hold{
} */
/*/////////////////inner window ie contains the panes//////////////////*/
#inner_window{
width:90%;
height:60%;
background-position-x:20%;
background-position-y: 90%;
background-image: url("images/posters/images\ \(27\).jpeg");
}
#left_pane,#right_pane{
width:47%;
height:98%;
border-style: solid;
border-color: rgb(14,38,65);
background-color:transparent;
}
#left_pane{
position:relative;
border-width: 12px 4px 10px 7px;
}
#right_pane{
position:relative;
border-width: 12px 7px 10px 4px;
}
/* ////////////////pane messages */
#right_pane_message{
top:-90%;
left:100px;
}
#left_pane_message{
top:-90%;
left:-100px;
}
/*/////////////////window pane knobs*/
.inner_window_knob{
top: 70px;
width:15px;
height:15px;
position: absolute;
border-radius: 50% 50%;
}
#left_pane_window_knob{
left: 88%;
background-image: linear-gradient(45deg,black,white);
}
#right_pane_window_knob{
left:2%;
background-image: linear-gradient(-45deg,black,white);
}
.pane_knob_holder{
top: 7px;
width:30px;
height:5px;
position: absolute;
border-radius: 50% 50%;
}
#left_pane_knob_holder{
left:-18px;
transform-origin: top right;
transform: rotateZ(40deg);
background-image: linear-gradient(45deg,black,white);
}
#right_pane_knob_holder{
left:7px;
transform-origin: bottom left;
transform: rotateZ(-30deg);
background-image: linear-gradient(-45deg,black,white);
}
/*/////////////////floor*/
#floor{
padding:3px;
grid-area: floor;
position: relative;
justify-content: center;
background:linear-gradient(to right,#DECBA4,#3E5151) ;
}
#image_center{
width:70%;
height:100%;
}
/*/////////////////stool//////////////////*/
#stool{
top: -120px;
left:150px;
width:200px;
height:200px;
position:absolute;
}
.stool_area{
border-top:15px solid rgb(144,93,14);
border-left:10px solid transparent;
border-right:10px solid transparent;
position:absolute;
}
#upper_stool_area{
top:50px;
left:25px;
width:130px;
border-bottom: 1px solid black;
}
#mid_stool_area{
top:66px;
left:40px;
width:100px;
}
#lower_stool_area{
top:130px;
left:65px;
width:70px;
height:10px;
position:absolute;
background-image: linear-gradient(to bottom,rgb(144,93,14),rgb(184,165,49),rgb(226, 215, 146));
}
.stool_legs{
width:3px;
border-bottom: 1px solid black;
border-top:80px solid rgb(144,93,14);
position:absolute;
}
#left_stool_leg{
top:81px;
left:55px;
border-left:5px solid transparent;
border-right:16px solid transparent;
}
#right_stool_leg{
top:81px;
left:120px;
border-left:16px solid transparent;
border-right:5px solid transparent;
}
/*/////////////////big drawer//////////////////*/
.full_drawer{
top: -70px;
left:175px;
width:150px;
height:120px;
position: absolute;
border-style: solid;
border-width: 2px 5px 1px 5px;
border-color: black;
}
/* #full_drawer_left{
top: -70px;
left:175px;
} */
#full_drawer_right{
z-index: 1;
top: -80px;
left:630px;
}
/*/////////////////drawer components//////////////////*/
.small_drawer{
width:100%;
height:33%;
background-color: pink;
border-bottom:1px solid black;
}
.knob{
width: 15px;
height:6px;
border-radius: 5px;
background-color: black;
}
/*/////////////////drawer stand//////////////////*/
.stand{
top:120px ;
left: -15px;
width:160px;
position: absolute;
border: 1px solid black;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 20px solid maroon;
}
#stand_left{
top:120px ;
left: -15px;
}
/*/////////////////lower lamps//////////////////*/
.lamp{
z-index: 2;
top: -190px;
left: 200px;
width:100px;
height:120px;
position: absolute;
}
#lamp_left{
top: -190px;
left: 200px;
}
#lamp_right{
top: -200px;
left: 650px;
}
.lamp-top{
width:45px;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-bottom: 60px solid maroon;
}
.lamp-mid{
width:5px;
height:90px;
background-color: yellow;
border:1px solid black;
}
.lamp-bottom{
width:90px;
height:10px;
position: relative;
background-color: blueviolet;
border:1px solid black;
}
/*/////////////////lower lamp switch//////////////////*/
.lamp_switch{
width:2px;
height:30px;
position: absolute;
border:1px solid black;
background-image: linear-gradient(to right,mediumorchid,white,mediumorchid);
}
#lamp_left_switch{
top: -53px;
left: 52px;
}
#lamp_right_switch{
top: -53px;
left: 54px;
}
/*/////////////////hanging lamps//////////////////*/
.top_lamp{
width:150px;
position:absolute;
}
.top_lamp_bottom{
z-index: 2;
width:40px;
height: 100px;
position: relative;
background:linear-gradient(to right,grey,white,black);
}
.top_lamp_mid{
width:4px;
height: 100px;
background-color: black;
}
/* #top_lamp_left{
left:0px;
} */
/* #top_lamp_left .top_lamp_mid{
height:40px;
} */
#top_lamp_right{
left:660px;
}
#top_lamp_right .top_lamp_mid{
height:35px;
}
#top_lamp_center{
z-index: 4;
left: 425px;
}
#top_lamp_center_holder{
width: 20px;
height:12px;
border-style: solid;
background-color: orangered;
border-color: black;
border-top-left-radius:10px ;
border-top-right-radius:10px ;
}
#top_lamp_center .top_lamp_mid{
height:130px;
}
#top_lamp_center_bottom{
width:40px;
position: relative;
border-bottom: 40px solid orange;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
}
/*/////////////////hanging lamps switch//////////////////*/
.top_lamp_switch{
position: absolute;
border:1px solid black;
}
#top_lamp_center_switch{
top: 40px;
left: 20px;
width:2px;
height:70px;
background-image: linear-gradient(to right,rgb(197, 157, 92),white,rgb(19, 212, 212));
}
#top_lamp_right_switch{
top: 100px;
left: 25px;
width:1.5px;
height:50px;
background-image: linear-gradient(to right,rgb(80, 77, 80),white,rgb(11, 10, 12));
}
#stand_right{
left: -4px;
border-left: 0px solid transparent;
border-right: 8px solid transparent;
border-bottom: 20px solid maroon;
}
/*/////////////////lower flower vase//////////////////*/
#vase{
top:-40px ;
left: 35px;
width:60px;
height:100px;
position: absolute;
border-radius:40%;
border: 1px solid black;
background-image: linear-gradient(to right,#0f0c29,#302b63,white,#24243e);
border-top: 2px solid black;
}
/*/////////////////lower vase flowers//////////////////*/
.flower{
width:1px;
border-left:1px;
position: absolute;
background-color: green;
border: 1px solid black;
}
#flower1{
top: -52px;
left: 25px;
height:50px;
}
#flower2{
top: -56px;
left: 29px;
height:54px;
}
#flower3{
top: -59px;
left: 34px;
height:57px;
}
/*/////////////////window pane flower vases//////////////////*/
.small_vase1{
width:25px;
position: absolute;
border-bottom: 2px solid black;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
}
.small_top{
top:-44px;
left:-20px;
width:64px;
height: 10px;
position: absolute;
border-radius: 10px;
background-color: chocolate;
}
#small_vase_left{
top:-120px;
left:90px;
border-top: 35px solid lavenderblush;
}
#small_vase_right{
z-index:1;
top:-120px;
left:270px;
border-top: 35px solid paleturquoise;
}
#small_vase_right div{
background-color: black;
}
/*/////////////////bed//////////////////*/
#bed{
z-index: 2;
top:-120px;
left:322px;
width:340px;
height:400px;
display: flex;
align-items:center;
flex-direction:column;
justify-content: flex-start;
position:absolute;
}
#bed_head{
width:250px;
display: flex;
align-items:center;
flex-direction:row;
}
.center_head_zone{
display: flex;
height: 120px;
align-items:center;
flex-direction:column;
justify-content: space-around;
}
.center_head{
width:220px;
height:20px;
border: 1px solid black;
background-color: hotpink;
}
.side_head{
width:15px;
height:150px;
border: 1px solid black;
background-color: white;
}
#bed_upper{
top:100px;
left:30px;
width:280px;
height:70px;
z-index: 4;
position: absolute;
border-top-right-radius: 30px;
border-top-left-radius: 30px;
border-bottom: 10px solid white;
background-image: linear-gradient(to bottom,rgb(243, 123, 43),rgb(226, 85, 19),rgb(104, 48, 16));
}
/* #left_head{
}
#right_head{
} */
/*
#bed_legs{ */
/* } */
.bed_legs{
top:180px;
width:7px;
position: absolute;
border-top:34px solid black ;
}
#left_leg{
left:50px;
border-right:9px solid transparent ;
border-left:1px solid transparent ;
}
#right_leg{
left:280px;
border-right:1px solid transparent ;
border-left:9px solid transparent ;
}
#pillow{
top:50px;
left:120px;
width:100px;
height:55px;
position: absolute;
border-radius: 30% 30%;
border:1px solid black;
background-image: linear-gradient(45deg, #fffbd5,#b20a2c);
}
/*/////////////////END//////////////////*/
Also see: Tab Triggers