JSFiddle - React, Tailwind, and code Playground
HTML
<body class="pl">
<div class="Standard">
<div class="box-wymiar-pl">
<p class="box" id="pl">Wybierz język</p>
<p class="box" id="en">Choose language</p>
<form class="align">
<label class="sel_lang" for="pol_but">
<input id="pol_but" type="radio" name="sel_lang" value="polish" checked />
<img src="http://s21.postimg.org/bh3yqiw7n/Polish_Flag_ico.png">
</label>
<label class="sel_lang" for="eng_but">
<input id="eng_but" type="radio" name="sel_lang" value="english" />
<img src="http://s21.postimg.org/vyox268b7/English_Flag_ico.png" />
</label>
<br />
<input type="submit" class="przycisk" value="" />
</label>
</form>
</div>
</div>
</body>
</html>
CSS
body.pl {
background-color: black;
background-image: url("http://s21.postimg.org/vr1a5nxcn/Polish_Flag.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
margin: 0;
min-width: 1224px;
min-height: 866px;
width: 100%;
height: 866px;
}
body.en {
background-color: black;
background-image: url("http://s21.postimg.org/z9da21y8n/English_Flag.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
margin: 0;
min-width: 1224px;
min-height: 866px;
width: 100%;
height: 866px;
}
div.Standard {
font-family: Caviar Dreams;
font-size: 24px;
}
div.box-wymiar-pl {
background-image: url("http://s21.postimg.org/dx5s4deaf/bg_lang.jpg");
background-repeat: repeat-x;
border-radius: 5px;
position: absolute;
left: 50%;
top: 50%;
margin-top: -96.5px;
margin-left: -201px;
width: 100%;
height: 100%;
max-width: 402px;
max-height: 193px;
border-color: #000000;
border:1px solid;
}
p.box#en {
position: relative;
margin: 0;
display: none;
margin-bottom: 5px;
padding: 6px;
text-align: center;
text-shadow: 2px 2px 3px #cadc76;
}
p.box#pl {
position: relative;
margin: 0;
margin-bottom: 5px;
padding: 6px;
text-align: center;
text-shadow: 2px 2px 3px #cadc76;
}
.sel_lang > input[type=radio] {
display:none;
}
input[type=radio] + img {
cursor:pointer;
}
.align {
text-align:center;
}
input[type=radio]:hover + img {
box-shadow: 0 0 2px 1px lime;
}
input[type=radio]:checked + img {
box-shadow: 0 0 2px 1px white;
}
.przycisk {
margin-top: 5px;
background-image: url('http://s21.postimg.org/l96mw674j/button.png');
background-position: left, top;
background-repeat: no-repeat;
background-color: transparent;
width: 114px;
height: 42px;
border: 0;
cursor: pointer;
...
JavaScript
$(document).ready(
function () {
$('#pol_but').click(
function () {
$('#en').hide();
$('#pl').stop(true,true).fadeIn(2000);
$('body').toggleClass('en pl');
});
$('#eng_but').click(
function () {
$('#pl').hide();
$('#en').stop(true,true).fadeIn(2000);
$('body').toggleClass('en pl');
});
});