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.
<section id="pakete">
<h1>Responsive Flipping Price-Table</h1>
<p class="section-text">This is a neat price-table. It saves you a lot of space and it looks nice. Have fun! <em>Also try resizing the window, to see the responsive Solution I came up with!</em></p>
<div class="box"><!-- The surrounding box -->
<!-- The front container -->
<div class="front">
<table border="0">
<tr>
<th>...</th>
<th>Paket 1</th>
<th>Paket 2</th>
<th>Paket 3</th>
<th>Paket 4</th>
<th>Paket 5</th>
<th>Paket 6</th>
<th>Paket 7</th>
<th>Paket 8</th>
<th>Paket 9</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-cancel"></td>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Price</th>
<td>1123,00$</td>
<td>5813,00$</td>
<td>2134,00$</td>
<td>5589,00$</td>
<td>1442,00$</td>
<td>3337,00$</td>
<td>7610,00$</td>
<td>9871,00$</td>
<td>5972,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_1">Details</button></td>
<td><button class="show-me_2">Details</button></td>
<td><button class="show-me_3">Details</button></td>
<td><button class="show-me_4">Details</button></td>
<td><button class="show-me_5">Details</button></td>
<td><button class="show-me_6">Details</button></td>
<td><button class="show-me_7">Details</button></td>
<td><button class="show-me_8">Details</button></td>
<td><button class="show-me_9">Details</button></td>
</tr>
</table>
</div>
<div class="responsive-tables">
<div class="little1 active">
<table>
<tr>
<th>...</th>
<th>Paket 1</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>1123,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_1">Details</button></td>
</tr>
</table>
</div>
<div class="little2 activetwo">
<table>
<tr>
<th>...</th>
<th>Paket 2</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>5813,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_2">Details</button></td>
</tr>
</table>
</div>
<div class="little3">
<table>
<tr>
<th>...</th>
<th>Paket 3</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr><tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>2134,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_3">Details</button></td>
</tr>
</table>
</div>
<div class="little4">
<table>
<tr>
<th>...</th>
<th>Paket 4</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>5589,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_4">Details</button></td>
</tr>
</table>
</div>
<div class="little5">
<table>
<tr>
<th>...</th>
<th>Paket 5</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>1442,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_5">Details</button></td>
</tr>
</table>
</div>
<div class="little6">
<table>
<tr>
<th>...</th>
<th>Paket 6</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>3337,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_6">Details</button></td>
</tr>
</table>
</div>
<div class="little7">
<table>
<tr>
<th>...</th>
<th>Paket 7</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>7610,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_7">Details</button></td>
</tr>
</table>
</div>
<div class="little8">
<table>
<tr>
<th>...</th>
<th>Paket 8</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>9871,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_8">Details</button></td>
</tr>
</table>
</div>
<div class="little9 last">
<table>
<tr>
<th>...</th>
<th>Paket 9</th>
</tr>
<tr>
<th>Service 1</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 2</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 3</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 4</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 5</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 6</th>
<td class="entypo-check"></td>
</tr>
<tr>
<th>Service 7</th>
<td class="entypo-cancel"></td>
</tr>
<tr>
<th>Price</th>
<td>5972,00$</td>
</tr>
<tr>
<th>...</th>
<td><button class="show-me_9">Details</button></td>
</tr>
</table>
</div>
<button class="next-table entypo-right-dir"></button>
<button class="prev-table entypo-left-dir"></button>
</div>
<!-- The backside containers -->
<div class="back first">
<h1>Paket 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 1
</p>
<button class="hide-me_1"></button>
</div>
<div class="back second">
<h1>Paket 2</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at Lorem ipsum dolor sit amet, consectetur adipisicing elit. Unde, necessitatibus, dicta consequatur quas quis dolores sapiente ducimus incidunt veniam repellat veritatis reiciendis consequuntur corporis tempora harum perspiciatis explicabo perferendis sunt aliquam eius quae consectetur eos distinctio ea eaque voluptates mollitia.
</p>
<button class="hide-me_2"></button>
</div>
<div class="back third">
<h1>Paket 3</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 3
</p>
<button class="hide-me_3"></button>
</div>
<div class="back fourth">
<h1>Paket 4</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 4
</p>
<button class="hide-me_4"></button>
</div>
<div class="back fifth">
<h1>Paket 5</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 5
</p>
<button class="hide-me_5"></button>
</div>
<div class="back sixth">
<h1>Paket 6</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 5
</p>
<button class="hide-me_6"></button>
</div>
<div class="back seventh">
<h1>Paket 7</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 5
</p>
<button class="hide-me_7"></button>
</div>
<div class="back eigth">
<h1>Paket 8</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 5
</p>
<button class="hide-me_8"></button>
</div>
<div class="back ninth">
<h1>Paket 9</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto natus labore dicta excepturi ab odit autem dolorem nulla neque sit laudantium sapiente aperiam magni nihil sed cupiditate asperiores at iure.<br /><br />No. 5
</p>
<button class="hide-me_9"></button>
</div>
</div><!-- The end of the box -->
</section><!-- END of section-wrap -->
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300|Open+Sans:400italic,600italic,400,300,600);
@import url(http://weloveiconfonts.com/api/?family=entypo);
/*
font-family: 'Source Sans Pro', serif;
font-family: 'Open Sans', sans-serif;
font-family: 'entypo', sans-serif;
*/
/* entypo */
[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
* {
box-sizing: border-box;
}
html, body {
height: 100%;
font-size: 62.5%;
}
/* Generelles */
h2 {
font: italic 600 2.2rem/1 'Open Sans', sans-serif;
color: #222;
}
p {
font: 400 1.4rem 'Open Sans', sans-serif;
color: #222;
}
h1 {
font: italic 300 3.4rem 'Source Sans Pro', serif;
color: #222;
text-align: center;
text-transform: uppercase;
}
.section-text {
text-align: center;
padding: 0 25%;
}
section {
width: 100%;
background: #fff;
padding-top: 70px;
}
section button.regular-bt {
margin: 20px;
border: none;
display: block;
background: #D33536;
color: #fff;
text-transform: uppercase;
font: 300 1.2rem 'Open Sans', sans-serif;
padding: 7px 15px;
border-radius: 5px;
transition: 0.1s;
}
section button:focus {
box-shadow: none;
outline: none;
}
section button:active {
box-shadow: 0px 3px 6px 0px #bc1414 inset;
}
section button:hover {
border-radius: 10px;
}
/* Section Pakete */
#pakete em {
color: #000;
font-weight: bold;
background: #7dc160;
border-bottom: 2px solid #3ca02a;
padding: 0px 7px;
line-height: 1.8;
}
#pakete .entypo-check {
color: #36ac3e;
}
#pakete .entypo-cancel {
color: #d33536;
}
#pakete table {
border-radius: 5px;
width: 100%;
height: 100%;
border: 1px solid #ddd;
border-spacing: 0;
font: 400 1.4rem 'Open Sans', sans-serif;
transition: width 0.2s height 0.2s;
}
#pakete tr:first-child th {
font: 400 1.4rem 'Open Sans', sans-serif !important;
text-transform: uppercase;
}
#pakete th, #pakete td {
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
text-align: center;
}
#pakete th:last-child, #pakete td:last-child {
border-right: none;
}
#pakete tr:last-child td, #pakete tr:last-child th {
border-bottom:none;
}
#pakete th {
background: #efefef;
font: 600 1.4rem 'Open Sans', sans-serif;
}
/* The surrounding box */
#pakete .box {
position: relative;
margin: 3% auto 0;
width: 70%;
height: 600px;
perspective: 10000;
transform-style: preserve-3d;
min-width: 950px;
overflow: visible;
transition: width 0.2s height 0.2s;
}
/* The front and the backside and the little tables */
#pakete .box .front, #pakete .box .back, #pakete .box .responsive-tables [class*="little"] {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
backface-visibility: hidden;
transform-style: preserve-3d;
transition: transform 0.7s; /* How long should the flipping be? */
transform-origin: 50% 50%;
background: #fff;
border-radius: 5px;
}
#pakete .box .responsive-tables [class*="little"] {
width: 48%;
}
#pakete .box .responsive-tables {
display: none;
width: 100%;
height: 100%;
}
/* 3states of the little tables */
#pakete .box .responsive-tables [class*="little"] {
transform: rotateY(0deg) translateX(250%);
transform-origin: 0 0;
transition: transform 0.6s, opacity 0.0s 0.4s;
opacity: 0.0;
}
#pakete .box [class*="little"].active {
transform: rotateY(0) translateX(0);
transition: transform 0.6s;
opacity: 1;
}
#pakete .box [class*="little"].activetwo {
transform: rotateY(0) translateX(106%);
transition: transform 0.6s;
opacity: 1;
}
#pakete .box [class*="little"].last {
transform: rotateY(0) translateX(-110%);
transition: transform 0.6s opacity 0.0s 0.4s;
opacity: 0.0;
}
/* The flipping system */
#pakete .front { /* große tabelle zu anfang nicht gedreht */
transform: rotateY(0deg);
}
#pakete .back { /* alle backsites gedreht, nicht sichtbar zu anfang */
transform: rotateY(180deg);
padding: 5%;
border: 1px solid #ddd;
box-sizing: border-box;
}
/*----- Drehung nach 1 ---------*/
#pakete .box.flip1 .front { /* große tabelle drehen */
transform: rotateY(-180deg);
}
#pakete .box.flip1 .little1 { /* bei mobile auch kleine tabelle drehen */
transform: rotateY(-180deg);
}
#pakete .box.flip1 .back.first { /* backsite sichtbar machen */
transform: rotateY(0deg);
}
/*----- Drehung nach 2 ---------*/
#pakete .box.flip2 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip2 .little2 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip2 .back.second {
transform: rotateY(0deg);
}
/*----- Drehung nach 3 ---------*/
#pakete .box.flip3 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip3 .little3 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip3 .back.third {
transform: rotateY(0deg);
}
/*----- Drehung nach 4 ---------*/
#pakete .box.flip4 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip4 .little4 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip4 .back.fourth {
transform: rotateY(0deg);
}
/*----- Drehung nach 5 ---------*/
#pakete .box.flip5 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip5 .little5 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip5 .back.fifth{
transform: rotateY(0deg);
}
/*----- Drehung nach 6 ---------*/
#pakete .box.flip6 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip6 .little6 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip6 .back.sixth{
transform: rotateY(0deg);
}
/*----- Drehung nach 5 ---------*/
#pakete .box.flip7 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip7 .little7 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip7 .back.seventh{
transform: rotateY(0deg);
}
/*----- Drehung nach 5 ---------*/
#pakete .box.flip8 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip8 .little8 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip8 .back.eigth{
transform: rotateY(0deg);
}
/*----- Drehung nach 5 ---------*/
#pakete .box.flip9 .front {
transform: rotateY(-180deg);
}
#pakete .box.flip9 .little9 {
transform: rotateY(-180deg) translateX(0);
}
#pakete .box.flip9 .back.ninth{
transform: rotateY(0deg);
}
#pakete .back img {
float: left;
width: 120px;
margin-top: 80px;
}
#pakete .back p {
padding-left: 40px;
margin-left: 120px;
}
#pakete .price {
font: 600 1.4rem 'Open Sans', sans-serif;
padding-left: 40px;
}
#pakete h2 {
margin-top: 40px;
}
/* The buttons */
#pakete .responsive-tables button.next-table {
position: absolute;
right: -3%;
top: 50%;
width: 60px;
height: 80px;
margin-top: -25px;
background: #D43536;
border: none;
color: #fff;
font-size: 2.5rem;
padding: 0;
z-index: 99;
border-radius: 50% 0 0 50%;
}
#pakete .responsive-tables button.prev-table {
position: absolute;
left: -3%;
top: 50%;
width: 60px;
height: 80px;
margin-top: -25px;
background: #D43536;
border: none;
color: #fff;
font-size: 2.5rem;
padding: 0;
z-index: 99;
border-radius: 0 50% 50% 0;
}
#pakete .box[class*="flip"] .responsive-tables button.next-table, #pakete .box[class*="flip"] .responsive-tables button.prev-table {
background: #d6b8b8;
pointer-events: none;
}
#pakete button {
border: none;
border-radius: 5px;
background: #D43536;
padding: 10px 25px;
color: #fff;
transition: box-shadow 0.1s, border-radius 0.3s;
font: 300 1.2rem 'Open Sans', sans-serif;
cursor: pointer;
}
#pakete button:focus {
box-shadow: none;
outline: none;
}
#pakete button:active {
box-shadow: 0px 3px 6px 0px #bc1414 inset;
}
#pakete button:hover {
border-radius: 10px;
}
#pakete [class*='hide-me_'] {
width: 0px !important;
height: 0px !important;
padding: 0px !important;
background: transparent !important;
border-radius: 100% !important;
border-top: 40px solid transparent !important;
border-bottom: 40px solid transparent !important;
border-left: 40px solid #f66f6f !important;
border-right: 40px solid transparent !important;
display: block;
position: absolute;
right: -41px;
top: -41px;
transform: rotate(315deg);
cursor: pointer;
}
#pakete [class*='hide-me_']:before {
content: "\232b";
font: 1.4rem 'entypo', sans-serif;
position: absolute;
top: -8px;
left: -32px;
color: #ffd8d8;
display: block;
transition: 0.3s;
}
#pakete [class*='hide-me_']:hover:before {
color: #fff;
}
@media only screen and (max-width : 1024px) {
/* The surrounding box */
#pakete .box {
position: relative;
margin: 3% auto 0;
width: 70%;
height: 500px;
perspective: 10000;
transform-style: preserve-3d;
min-width: 0px;
overflow: hidden;
transition: width 0.2s height 0.2s;
}
/* The front and the backside and the little tables */
#pakete .box .front, #pakete .box .back, #pakete .box .responsive-tables [class*="little"] {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
backface-visibility: hidden;
transform-style: preserve-3d;
transition: transform 0.7s; /* How long should the flipping be? */
transform-origin: 50% 50%;
background: #fff;
border-radius: 5px;
}
#pakete .box .responsive-tables [class*="little"] {
width: 47%;
}
#pakete .box .responsive-tables {
display: block;
width: 100%;
height: 100%;
}
#pakete .front {
display: none;
}
/* 3states of the little tables */
#pakete .box .responsive-tables [class*="little"] {
transform: rotateY(0deg) translateX(250%);
transform-origin: 0 0;
transition: transform 0.6s, opacity 0.0s 0.4s;
opacity: 0.0;
}
#pakete .box [class*="little"].active {
transform: rotateY(0) translateX(0);
transition: transform 0.6s;
opacity: 1;
}
#pakete .box [class*="little"].activetwo {
transform: rotateY(0) translateX(112.7659574%);
transition: transform 0.6s;
opacity: 1;
}
#pakete .box [class*="little"].last {
transform: rotateY(0) translateX(-110%);
transition: transform 0.6s opacity 0.0s 0.4s;
opacity: 0.0;
}
} /* Ipad 1-3 und große Tablets Media Query Ende */
@media only screen and (max-width : 768px) {
#pakete .box {
width: 90%;
min-width: 0px;
} /* Kindle Fire und kleine Tablets Media Query ende*/
@media only screen and (max-width : 533px) {
/* Section Pakete */
#pakete .box {
position: relative;
margin: 3% auto 0;
width: 80%;
height: 400px;
perspective: 10000;
transform-style: preserve-3d;
min-width: 0px;
overflow: hidden;
transition: width 0.2s height 0.2s;
}
/* The front and the backside and the little tables */
#pakete .box .front, #pakete .box .back, #pakete .box .responsive-tables [class*="little"] {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
backface-visibility: hidden;
transform-style: preserve-3d;
transition: transform 0.7s; /* How long should the flipping be? */
transform-origin: 50% 50%;
background: #fff;
border-radius: 5px;
}
#pakete .box .responsive-tables {
display: block;
}
#pakete .front {
display: none;
}
/* 3states of the little tables */
#pakete .box .responsive-tables [class*="little"] {
transform: rotateY(0deg) translateX(150%);
transform-origin: 0 0;
transition: transform 0.6s, opacity 0.0s 0.4s;
opacity: 0.0;
}
#pakete .box [class*="little"].active {
transform: rotateY(0) translateX(0);
transition: transform 0.6s;
opacity: 1;
}
#pakete .box [class*="little"].activetwo {
transform: rotateY(0) translateX(110%);
transition: transform 0.6s;
opacity: 1;
}
#pakete .box [class*="little"].last {
transform: rotateY(0) translateX(-110%);
transition: transform 0.6s opacity 0.0s 0.4s;
opacity: 0.0;
}
} /* Handys Media Query Ende */
$(document).ready( function(){
// The flipping control-center
// Two functions for every box :(
// 1
$(".show-me_1").on("click", function() {
$(".box").addClass("flip1");
});
$(".hide-me_1").on("click", function() {
$(".box").removeClass("flip1");
});
// 2
$(".show-me_2").on("click", function() {
$(".box").addClass("flip2");
});
$(".hide-me_2").on("click", function() {
$(".box").removeClass("flip2");
});
// 3
$(".show-me_3").on("click", function() {
$(".box").addClass("flip3");
});
$(".hide-me_3").on("click", function() {
$(".box").removeClass("flip3");
});
// 4
$(".show-me_4").on("click", function() {
$(".box").addClass("flip4");
});
$(".hide-me_4").on("click", function() {
$(".box").removeClass("flip4");
});
// 5
$(".show-me_5").on("click", function() {
$(".box").addClass("flip5");
});
$(".hide-me_5").on("click", function() {
$(".box").removeClass("flip5");
});
// 6
$(".show-me_6").on("click", function() {
$(".box").addClass("flip6");
});
$(".hide-me_6").on("click", function() {
$(".box").removeClass("flip6");
});
// 7
$(".show-me_7").on("click", function() {
$(".box").addClass("flip7");
});
$(".hide-me_7").on("click", function() {
$(".box").removeClass("flip7");
});
// 8
$(".show-me_8").on("click", function() {
$(".box").addClass("flip8");
});
$(".hide-me_8").on("click", function() {
$(".box").removeClass("flip8");
});
// 9
$(".show-me_9").on("click", function() {
$(".box").addClass("flip9");
});
$(".hide-me_9").on("click", function() {
$(".box").removeClass("flip9");
});
$('[class*="-me_"]').click( function(){
var boxclass = $('.box').attr('class');
$('p.boxclass').html(boxclass);
});
// Table Carousel
$('button.next-table').click( function(){
var currentone = $('.responsive-tables .active');
var currenttwo = $('.responsive-tables .activetwo');
var next = $('.responsive-tables .activetwo + [class*="little"]');
var last = $('.responsive-tables .last');
next.addClass('activetwo');
currentone.removeClass('active').addClass('last');
currenttwo.removeClass('activetwo').addClass('active');
last.removeClass('last');
var echonext = next.attr('class');
//alert(echonext);
if( echonext === undefined ){
$('.little1').addClass('activetwo');
}
});
$('button.prev-table').click( function(){
var currentone = $('.responsive-tables .active');
var currenttwo = $('.responsive-tables .activetwo');
var prev = $('.responsive-tables .last').prev('[class*="little"]');
var last = $('.responsive-tables .last');
prev.addClass('last');
currentone.removeClass('active').addClass('activetwo');
last.removeClass('last').addClass('active');
currenttwo.removeClass('activetwo');
//alert(prev.attr('class'));
if( prev.attr('class') === undefined ){
$('.responsive-tables .little9').addClass('last');
}
});
}); // .ready-END
Also see: Tab Triggers