I'm using Creative CSS3 Animation Menus by CODROPS which the Demo can be seen HERE
I want to make a subsmenu at Tetapan(setting) when user hover the mouse at it LIKE THIS .
This is my code that I try to put arrow at the subsmenu
This is css code
#font-face {
font-family: 'WebSymbolsRegular';
src: url('websymbols/websymbols-regular-webfont.eot');
src: url('websymbols/websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('websymbols/websymbols-regular-webfont.woff') format('woff'),
url('websymbols/websymbols-regular-webfont.ttf') format('truetype'),
url('websymbols/websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg');
font-weight: normal;
font-style: normal;
}
.ca-menu{
padding:0;
margin:5px auto;
width: 145px;
}
.ca-menu li{
width: auto;
height: 50px;
overflow: hidden;
position: relative;
display: block;
background: #fff;
-webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
-moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
margin-bottom: 4px;
-webkit-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-ms-transition: all 300ms ease-in-out;
transition: all 300ms ease-in-out;
}
.ca-menu li:last-child{
margin-bottom: 0px;
}
.ca-menu li a{
text-align: left;
width: 100%;
height: 100%;
display: block;
color: #333;
position: relative;
}
.ca-icon{
font-family: 'WebSymbolsRegular', cursive;
font-size: 20px;
color: #333;
text-shadow: 0px 0px 1px #333;
line-height: 25px;
position: absolute;
width: 9px;
left: 2px;
text-align: center;
-webkit-transition: all 300ms linear;
-moz-transition: all 300ms linear;
-o-transition: all 300ms linear;
-ms-transition: all 300ms linear;
transition: all 300ms linear;
}
.ca-content{
position: absolute;
left: 30px;
width: 370px;
height: 60px;
top: 5px;
}
.ca-main{
line-height: 25px;
font-size: 15px;
-webkit-transition: all 300ms linear;
-moz-transition: all 300ms linear;
-o-transition: all 300ms linear;
-ms-transition: all 300ms linear;
transition: all 300ms linear;
}
.ca-sub{
font-size: 14px;
color: #666;
}
.ca-menu li:hover{
background-color: #000;
}
.ca-menu li:hover .ca-icon{
color: #f900b0;
font-size: 120px;
opacity: 0.2;
left: -20px;
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
-ms-transform: rotate(20deg);
transform: rotate(20deg);
}
.ca-menu li:hover .ca-main{
color: #f900b0;
opacity: 0.8;
}
.ca-menu li:hover .ca-sub{
color: #fff;
opacity: 0.8;
}
/** Here I add arrow **/
.has-sub>a::after {
content: '';
position: absolute;
top: 20px;
right: 5px;
width: 0px;
height: 0px;
/* Creating the arrow using borders */
border: 4px solid transparent;
border-left: 4px solid #333;
}
ul li:hover>a::after {
border-left: 4px solid #f900b0;
}
HTML code
<ul class="ca-menu">
<li>
<a href="pagehome.php">
<span class="ca-icon">D</span>
<div class="ca-content">
<h2 class="ca-main">Halaman Utama</h2>
</div>
</a>
</li>
<li>
<a href="addpage.php">
<span class="ca-icon">F</span>
<div class="ca-content">
<h2 class="ca-main">Borang Baru</h2>
</div>
</a>
</li>
<li>
<a href="searchpage.php">
<span class="ca-icon">L</span>
<div class="ca-content">
<h2 class="ca-main">Carian Borang</h2>
</div>
</a>
</li>
<li class='has-sub'>
<a href="settingpage.php">
<span class="ca-icon">S</span>
<div class="ca-content">
<h2 class="ca-main">Tetapan</h2>
</div>
</a>
<ul>
<li>
<a href="settingpage.php">
<span class="ca-icon">S</span>
<div class="ca-content">
<h2 class="ca-main">Tetapan</h2>
</div>
</a>
</li>
</ul>
</li>
<li>
<a href="out.php" onClick="return confirm('Anda pasti untuk keluar dari sistem ?');">
<span class="ca-icon">X</span>
<div class="ca-content">
<h2 class="ca-main">Keluar</h2>
</div>
</a>
</li>
</ul>
Related
cannot get the smooth fade of the font awesome icon on the mouse hover.
What am I doing wrong? Ideally I want to get the icon fade in and also add some opacity to the background image.
fiddle:
http://jsfiddle.net/W5e9Q/45/
CODE:
#import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' );
#import url( 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
.adminDemoVideo {
position: relative;
display: inline-block;
transition: all .5s linear;
}
.adminDemoVideo::before {
content: '\f04b';
z-index: 5;
position: absolute;
left: 50%;
top: 50%;
transform: translate( -50%, -50% );
padding: 3px 15px 3px 25px;
color: white;
font-family: 'FontAwesome';
font-size: 50px !important;
background-color: rgba(23, 35, 34, 0.75);
border-radius: 5px 5px 5px 5px;
display:none;
transition: all .5s linear;
}
.adminDemocontainer:hover a::before {
display:block;
transition: all .5s linear;
}
<div class="adminDemocontainer">
<a href="https://player.vimeo.com/video/153113362?autoplay=1&color=54b3e4" class="adminDemoVideo">
<img src="http://placehold.it/1200x800/fc0" class="img-responsive">
</a>
</div>
i have add same css please check your help full
#import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' );
#import url( 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
.adminDemoVideo {
position: relative;
display: inline-block;
transition:all 0.3s ease;
}
.adminDemoVideo:after {
content: '\f04b';
z-index: 5;
position: absolute;
left: 50%;
top: 50%;
transform: translate( -50%, -50% );
padding: 3px 15px 3px 25px;
color: white;
font-family: 'FontAwesome';
font-size: 50px !important;
background-color: rgba(23, 35, 34, 0.75);
border-radius: 5px 5px 5px 5px;
-webkit-transition: all 1s;
transition: all 1s;
opacity:0;
}
.adminDemoVideo:hover:after {
opacity:1;
}
<div class="adminDemocontainer">
<a href="https://player.vimeo.com/video/153113362?autoplay=1&color=54b3e4" class="adminDemoVideo">
<img src="http://placehold.it/1200x800/fc0" class="img-responsive">
</a>
</div>
I am new to coding, and I am making a home page. I was trying to get the black and white hover feature on the images of my home pages. However, when I hover my mouse over the image, it does not work. It is only until you hover to the left of the image that the image will turn from color to BW. Any ideas on how to fix this? Any help is greatly appreciated!
Here is my code:
#font-face {
font-family: "p22-underground";
src: qzo1okq;
}
.container {
position: absolute;
padding-bottom: 0px;
margin-top: -125px;
margin-right: -70px;
float: left;
}
.Marlon {
position: absolute;
margin-top: -275px;
margin-left: 15px;
}
/*B&W*/
.blue {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.blue:hover {
-webkit-filter: grayscale(100%);
}
.blue {
position: relative;
background-position: left top;
margin-top: 120px;
margin-left: -250px;
max-width:100%;
height:auto;
text-align: center;
}
/*B&W*/
.Tammy {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.Tammy:hover {
-webkit-filter: grayscale(100%);
display: block;
}
.Tammy {
position: relative;
background-position: left top;
margin-top: -5px;
margin-left: -250px;
max-width:100%;
height:auto;
text-align: center;
}
/*B&W*/
.Tacos {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.Tacos:hover {
-webkit-filter: grayscale(100%);
}
.Tacos {
position: relative;
background-position: center;
margin-top: -623px;
margin-left: 100px;
max-width:100%;
text-align: center;
}
/*B&W*/
.Glasses {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.Glasses:hover {
-webkit-filter: grayscale(100%);
}
.Glasses {
position: relative;
background-position: center;
margin-top: -5px;
margin-left: 100px;
max-width:100%;
height:auto;
text-align: center;
}
/*B&W*/
.Door {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.Door:hover {
-webkit-filter: grayscale(100%);
}
.Door{
position: relative;
background-position: right top;
margin-top: -623px;
Margin-left:700px;
max-width:100%;
height:auto;
text-align: center;
}
.Social {
position: relative;
text-align: center;
inline: block;
padding-bottom: 0px;
top:-25px;
bottom: 0px;
margin:auto;
}
body {
background-image: url("http://ac.aup.edu/~a94241/background.jpeg");
}
ul {
list-style-type: none;
height: 50px;
margin: 150;
padding: 80;
overflow: hidden;
margin-top: 200px;
background-color: black;
font-family: "p22-underground";
font-weight: "500";
font-size: 150%;
}
li {
float: none;
color: "#fcf8de";
position: relative;
display: inline-block;
bottom: 12px;
margin-left: 10px;
margin-right: 10px;
}
li a {
display: block;
color: "#fcf8de";
text-align: center;
padding: 14px 16px;
margin-left: 5px;
}
footer {
height:10px;
padding: 20px;
margin-top:100px;
text-align:left;
vertical-align:middle;
padding-top: 14px;
background-color: black;
font-family: "p22-underground";
font-weight: "300";
position:static;
}
<!DOCTYPE html>
<html>
<head>
<script src="https://use.typekit.net/qzo1okq.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
</head>
<body>
<div class="container">
<a href="http://ac.aup.edu/~a94241/Marlon Coding.html">
<img src="http://ac.aup.edu/~a94241/cactus.png" alt="Cactus Vector" width="100" height="90">
</a>
</div>
<div class="Marlon">
<a href="http://ac.aup.edu/~a94241/Marlon Coding.html">
<img src="http://ac.aup.edu/~a94241/Marlon Vector.png" alt="Marlon Vector" width="450" height="550">
</a>
</div>
<ul>
<center>
<h1 style="font-p22-underground-sc, sans-serif;font-style:normal; font-weight:500; font-size:80% "</h1>
<li>PHILOSOPHIE</li>
<li>MENU</li>
<li>NOUS TROUVER</li>
<li>AVIS</li>
<li>CONTACT
</li>
</ul>
</center>
<div class="opacity">
<div class="blue">
<a href="http://ac.aup.edu/~a94241/Philosophie.html">
<img src="http://ac.aup.edu/~a94241/blue car.png" alt="BlueCar" width="300" height="310">
</a>
</div>
<div class="Tammy">
<a href="http://ac.aup.edu/~a94241/Avis.html">
<img src="http://ac.aup.edu/~a94241/tammy Lunch.png" alt="TammyLunch" width="300" height="310">
</a>
</div>
<div class="Tacos">
<a href="http://ac.aup.edu/~a94241/Contact.html">
<img src="http://ac.aup.edu/~a94241/tacos.png" alt="Tacos" width="300" height="310">
</a>
</div>
<div class="Glasses">
<a href="http://ac.aup.edu/~a94241/Menu.html">
<img src="http://ac.aup.edu/~a94241/Glasses.png" alt="Glasses" width="300" height="310">
</a>
</div>
<div class="Door">
<a href="http://ac.aup.edu/~a94241/Nous Trouver.html">
<img src="http://ac.aup.edu/~a94241/door.png" alt="Door" width="300" height="620">
</a>
</div>
</div>
<footer>
<p1><font color="#fcf8de">CALL: 01 40 60 12 12</font></p1>
<div class="Social">
<a href="https://www.facebook.com/restaurantmarlon">
<img src="http://ac.aup.edu/~a94241/facebook.png" alt="Facebook Vector" width="20" height="25">
</a>
<a href="https://www.instagram.com/restaurantmarlon/">
<img src="http://ac.aup.edu/~a94241/instragram.png" alt="Instargram Vector" width="20" height="25">
</a>
</div>
</footer>
</body>
</html>
I have a image hover effect it hovers well. but i need to be just like the bottom.. as of right now everything is hidden until you hover then it shows... I have tried to modify the margin and padding with no luck
Demo Image Here
.hovereffect {
width: 100%;
height: 100%;
float: left;
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
}
.hovereffect .overlay {
width: 100%;
position: absolute;
overflow: hidden;
left: 0;
top: auto;
bottom: 0;
padding: 1em;
height: 4.75em;
background: #79FAC4;
color: #3c4a50;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,100%,0);
transform: translate3d(0,100%,0);
}
.hovereffect img {
display: block;
position: relative;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
}
.hovereffect:hover img {
-webkit-transform: translate3d(0,-10%,0);
transform: translate3d(0,-10%,0);
}
.hovereffect h2 {
text-transform: uppercase;
color: #fff;
text-align: center;
position: relative;
font-size: 17px;
padding: 10px;
background: rgba(0, 0, 0, 0.6);
float: left;
margin: 0px;
display: inline-block;
}
.hovereffect a.info {
display: inline-block;
text-decoration: none;
padding: 7px 14px;
text-transform: uppercase;
color: #fff;
border: 1px solid #fff;
margin: 50px 0 0 0;
background-color: transparent;
}
.hovereffect a.info:hover {
box-shadow: 0 0 5px #fff;
}
.hovereffect p.icon-links a {
float: right;
color: #3c4a50;
font-size: 1.4em;
}
.hovereffect:hover p.icon-links a:hover,
.hovereffect:hover p.icon-links a:focus {
color: #252d31;
}
.hovereffect h2,
.hovereffect p.icon-links a {
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,200%,0);
transform: translate3d(0,200%,0);
}
.hovereffect p.icon-links a span:before {
display: inline-block;
padding: 8px 10px;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.hovereffect:hover .overlay,
.hovereffect:hover h2,
.hovereffect:hover p.icon-links a {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
.hovereffect:hover h2 {
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.hovereffect:hover p.icon-links a:nth-child(3) {
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
}
.hovereffect:hover p.icon-links a:nth-child(2) {
-webkit-transition-delay: 0.15s;
transition-delay: 0.15s;
}
.hovereffect:hover p.icon-links a:first-child {
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
<div class="hovereffect">
<img class="img-responsive" src="http://placehold.it/350x200" alt="">
<div class="overlay">
<h2>Effect 10</h2>
<p class="icon-links">
<a href="#">
<span class="fa fa-twitter"></span>
</a>
<a href="#">
<span class="fa fa-facebook"></span>
</a>
<a href="#">
<span class="fa fa-instagram"></span>
</a>
</p>
</div>
</div>
</div>
Alter the translate properties in the CSS:
.hovereffect .overlay {
width: 100%;
position: absolute;
overflow: hidden;
left: 0;
top: auto;
bottom: 0;
padding: 1em;
height: 4.75em;
background: #79FAC4;
color: #3c4a50;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,50%,0);
transform: translate3d(0,50%,0);
}
I changed the above to translate3d(0,50%,0); the higher the Y (middle) percentage, the more the overlay is hidden.
.hovereffect {
width: 100%;
height: 100%;
float: left;
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
}
.hovereffect .overlay {
width: 100%;
position: absolute;
overflow: hidden;
left: 0;
top: auto;
bottom: 0;
padding: 1em;
height: 4.75em;
background: #79FAC4;
color: #3c4a50;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,50%,0);
transform: translate3d(0,50%,0);
}
.hovereffect img {
display: block;
position: relative;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
}
.hovereffect:hover img {
-webkit-transform: translate3d(0,-10%,0);
transform: translate3d(0,-10%,0);
}
.hovereffect h2 {
text-transform: uppercase;
color: #fff;
text-align: center;
position: relative;
font-size: 17px;
padding: 10px;
background: rgba(0, 0, 0, 0.6);
float: left;
margin: 0px;
display: inline-block;
}
.hovereffect a.info {
display: inline-block;
text-decoration: none;
padding: 7px 14px;
text-transform: uppercase;
color: #fff;
border: 1px solid #fff;
margin: 50px 0 0 0;
background-color: transparent;
}
.hovereffect a.info:hover {
box-shadow: 0 0 5px #fff;
}
.hovereffect p.icon-links a {
float: right;
color: #3c4a50;
font-size: 1.4em;
}
.hovereffect:hover p.icon-links a:hover,
.hovereffect:hover p.icon-links a:focus {
color: #252d31;
}
.hovereffect h2,
.hovereffect p.icon-links a {
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,200%,0);
transform: translate3d(0,200%,0);
}
.hovereffect p.icon-links a span:before {
display: inline-block;
padding: 8px 10px;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.hovereffect:hover .overlay,
.hovereffect:hover h2,
.hovereffect:hover p.icon-links a {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
.hovereffect:hover h2 {
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.hovereffect:hover p.icon-links a:nth-child(3) {
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
}
.hovereffect:hover p.icon-links a:nth-child(2) {
-webkit-transition-delay: 0.15s;
transition-delay: 0.15s;
}
.hovereffect:hover p.icon-links a:first-child {
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
<div class="hovereffect">
<img class="img-responsive" src="http://placehold.it/350x200" alt="">
<div class="overlay">
<h2>Effect 10</h2>
<p class="icon-links">
<a href="#">
<span class="fa fa-twitter"></span>
</a>
<a href="#">
<span class="fa fa-facebook"></span>
</a>
<a href="#">
<span class="fa fa-instagram"></span>
</a>
</p>
</div>
</div>
</div>
I've been trying to remove this ugly flicker when hovering over the images. I've tried adding -webkit-backface-visibility: hidden; to the hover element along with the :hover itself but can't seem to shake it. Seems the promblem is only on Chrome and Safari.
website: http://best-law-firm-sites.com/lawpromo12/
.col-sm-4 {
width: 33.3333%;
float: left;
}
.panel-wrap {
height: 100% !important;
}
.panel-wrap .col-sm-4 {
padding: 0;
}
.hovereffect {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
cursor: default;
}
.hovereffect .overlay {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.hovereffect h2,
.hovereffect img {
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
.hovereffect img {
display: block;
position: relative;
-webkit-transform: scale(1.001);
-ms-transform: scale(1.001);
-moz-transform: scale(1.001);
-o-transform: scale(1.001);
transform: scale(1.001);
}
.hovereffect:hover img {
-webkit-transform: scale(1.17);
-ms-transform: scale(1.17);
-moz-transform: scale(1.17);
-o-transform: scale(1.17);
transform: scale(1.17);
}
.hovereffect h2 {
bottom: 10%;
color: #fff;
font-size: 30px;
font-weight: 700;
padding: 10px 10px 10px 17px;
position: absolute;
text-align: left;
text-shadow: 2px 3px 6px rgba(0, 0, 0, 1);
text-transform: uppercase;
}
.hovereffect h2::after {
display: block;
content: "";
height: 4px;
width: 75px;
background: #BCA474;
margin: 20px 0 0;
box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.6);
}
.hovereffect a.info {
display: inline-block;
text-decoration: none;
padding: 7px 14px;
text-transform: uppercase;
color: #fff;
margin: 50px 0 0 0;
background-color: transparent;
-webkit-transform: scale(1.5);
-ms-transform: scale(1.5);
transform: scale(1.5);
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
font-weight: normal;
height: 100%;
width: 85%;
position: absolute;
top: 0;
left: 0;
padding: 70px;
}
.hovereffect:hover a.info {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
<div class="col-sm-4 panel-1">
<div class="hovereffect">
<img class="img-responsive" src="http://best-law-firm-sites.com/lawpromo12/wp-content/uploads/2016/02/panel1.jpg" alt="">
<div class="overlay">
<h2>Family Law</h2>
<a class="info" href="services/family-law/"></a>
</div>
</div>
</div>
<div class="col-sm-4 panel-2">
<div class="hovereffect">
<img class="img-responsive" src="http://best-law-firm-sites.com/lawpromo12/wp-content/uploads/2016/02/panel.jpg" alt="">
<div class="overlay">
<h2>Estate Planning</h2>
<a class="info" href="services/estate-planning/"></a>
</div>
</div>
</div>
<div class="col-sm-4 panel-2">
<div class="hovereffect">
<img class="img-responsive" src="http://best-law-firm-sites.com/lawpromo12/wp-content/uploads/2016/02/panel.jpg" alt="">
<div class="overlay">
<h2>Wills & Trusts</h2>
<a class="info" href="services/wills-trusts/"></a>
</div>
</div>
</div>
I have encountered similarly strange behavior in the past when using the backface visibility hack to trick the browser into using the 3d pipeline. There are other ways to 'trick' the browser into using the 3d pipeline like:
.class{
transform: translate3d(0,0,1);
}
You can resolve this problem by increasing the transform scale property to 1.001:
.hovereffect img{transform: scale(1.001);}
I have a question regarding CSS transformation. I made a Dropdown menu in which the dropdown (submenu) should have a special shape. See here:
https://drive.google.com/folderview?id=0B5Ki_dh4A-VJY2ZKQUJaQnF5SDQ&usp=sharing
So far I could manage a part of it with: transform: skewY. How I can finish the rest as shown in the picture above?
Here is my JSFiddle: http://jsfiddle.net/sxfxs/
Has anybody an idea?
Here is my code:
<!DOCTYPE html>
<html>
<head>
<title>MENUTEST</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
#menu {
font-family: TrajanProRegular;
position: absolute;
top:100px;
width: 1100px;
height: 70px;
background-color: #484441;
color: #8C8985;
font-weight: bold;
clear: both;
text-align: center;
vertical-align: middle;
line-height: 70px;
display: inline-block;
}
nav {
width: 1100px;
height: 70px;
background: #484441;
line-height: 70px;
position: absolute;
}
nav span {
font: 1.35em 'TrajanProRegular';
}
nav a {
text-decoration: none;
}
nav ul {
text-align: center;
margin-top: -1px;
display: inline-block;
}
ul li {
font: 9px 'PT Sans Narrow';
cursor: pointer;
-webkit-transition: padding .05s linear;
-moz-transition: padding .05s linear;
-ms-transition: padding .05s linear;
-o-transition: padding .05s linear;
transition: padding .05s linear;
}
ul li.drop {
position: relative;
/* float: left;*/
}
ul > li {
display: inline-block;
letter-spacing: 0.11em;
padding: 0 10px 0;
}
ul li a {
line-height: 70px;
padding: 0 10px;
height: 70px;
color: #8C8985;
font: 1.3em/70px TrajanProRegular;
/* font: 10pt/70px TrajanProBold; */
-webkit-transition: all .1s ease-out;
-moz-transition: all .1s ease-out;
-ms-transition: all .1s ease-out;
-o-transition: all .1s ease-out;
transition: all .1s ease-out;
border-left: 1px solid #777370;
border-right: 1px solid #777370;
}
ul li a:hover {
color: #eee;
}
.dropOut .triangle {
width: 0;
height: 0;
position: absolute;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid #239976;
top: -8px;
left: 50%;
margin-left: -8px;
}
.dropdownContain {
width: 160px;
position: absolute;
z-index: 2;
left: 50%;
margin-left: -80px; /* half of width */
top: -400px;
}
.dropOut {
width: 185px;
background: #239976;
float: left;
position: relative;
margin-top: 0px;
opacity: 0;
-webkit-box-shadow: 0 1px 6px rgba(0,0,0,.15);
-moz-box-shadow: 0 1px 6px rgba(0,0,0,.15);
box-shadow: 0 1px 6px rgba(0,0,0,.15);
-webkit-transition: all .1s ease-out;
-moz-transition: all .1s ease-out;
-ms-transition: all .1s ease-out;
-o-transition: all .1s ease-out;
transition: all .1s ease-out;
-webkit-transform: skewY(3deg);
-moz-transform: skewY(3deg);
-ms-transform: skewY(3deg);
-o-transform: skewY(3deg);
transform: skewY(3deg);
}
.dropOut ul {
float: left;
padding: 10px 0;
-webkit-transform: skewY(-3deg);
-moz-transform: skewY(-3deg);
-ms-transform: skewY(-3deg);
-o-transform: skewY(-3deg);
transform: skewY(-3deg);
}
.dropOutb {
width: 185px;
background: #239976;
float: left;
position: relative;
margin-top: 0px;
opacity: 0;
-webkit-box-shadow: 0 1px 6px rgba(0,0,0,.15);
-moz-box-shadow: 0 1px 6px rgba(0,0,0,.15);
box-shadow: 0 1px 6px rgba(0,0,0,.15);
-webkit-transition: all .1s ease-out;
-moz-transition: all .1s ease-out;
-ms-transition: all .1s ease-out;
-o-transition: all .1s ease-out;
transition: all .1s ease-out;
z-index: -1;
}
.dropOut ul li {
text-align: left;
float: left;
width: 150px;
/* padding: 12px 0 10px 15px; */
margin: 0px 3px;
color: #FFF;
/* -webkit-border-radius: 4px;
* -moz-border-radius: 4px;
* border-radius: 4px;
*/
-webkit-transition: background .1s ease-out;
-moz-transition: background .1s ease-out;
-ms-transition: background .1s ease-out;
-o-transition: background .1s ease-out;
}
/* NEW */
.dropOut ul li a{
font: 12px 'PT Sans Narrow';
border: none !important;
/* padding: 5px 0 10px 0px !important; */
text-align: left;
width: 160px !important;
margin: 0px 5px 0px 0px !important;
padding: 5px 0 10px 0px !important;
float: left;
height: 15px !important;
-webkit-transition: padding .05s linear;
-moz-transition: padding .05s linear;
-ms-transition: padding .05s linear;
-o-transition: padding .05s linear;
transition: padding .05s linear;
}
.dropOut ul li:hover {
/* background: #CCE5DB; */
/* text-shadow: 2px 2px 2px #FFFFFF; */
/* filter:DropShadow(Color=#fffff, OffX=2, OffY=2); */
}
.dropOut ul li:hover a {
color: #ACD6C6;
}
ul li:hover a { color: white; }
ul li:hover .dropdownContain { top: 65px; }
ul li:hover .underline { border-bottom-color: #777; }
ul li:hover .dropOut { opacity: 1; margin-top: 0px; }
</style>
</head>
<body>
<div id="menu">
<nav>
<ul>
<li class="drop">
<span>T</span>OPmenu1
<div class="dropdownContain">
<div class="dropOut dropOutb">
<!--<div class="triangle"></div>-->
<ul>
<li>T1Sub1</li>
<li>T1Sub2</li>
</ul>
</div> <!-- dropOut -->
</div> <!-- dropdownContain -->
</li> <!-- drop -->
<li class="drop">
<span>T</span>OPmenu2
<div class="dropdownContain">
<div class="dropOut dropOutb">
<!--<div class="triangle"></div>-->
<ul>
<li>Topmenu2sub1</li>
<li>Topmenu2sub2</li>
</ul>
</div> <!-- dropOut -->
</div> <!-- dropdownContain -->
</li> <!-- drop -->
<li class="drop">
<span>T</span>OPmenu3
<div class="dropdownContain">
<div class="dropOut">
<!--<div class="triangle"></div>-->
<ul>
<li>TOPmenu3Sub1</li>
<li>TOPmenu3Sub2</li>
</ul>
</div> <!-- dropOut -->
</div> <!-- dropdownContain -->
</li> <!-- drop -->
<li class="drop">
<span>T</span>OPmenu4
<div class="dropdownContain">
<div class="dropOut">
<!--<div class="triangle"></div>-->
<ul>
<li>TOPmenu4Sub1</li>
<li>TOPmenu4Sub2</li>
<li>TOPmenu4Sub3</li>
<li>TOPmenu4Sub4</li>
</ul>
</div> <!-- dropOut -->
</div> <!-- dropdownContain -->
</li> <!-- drop -->
<li class="drop">
<span>T</span>OPmenu5
<div class="dropdownContain">
<div class="dropOut">
<!--<div class="triangle"></div>-->
<ul>
<li>TOPmenu5Sub1</li>
<li>TOPmenu5Sub2</li>
<li>TOPmenu5Sub3</li>
<li>TOPmenu5Sub4</li>
<li>TOPmenu5Sub5</li>
</ul>
</div> <!-- dropOut -->
</div> <!-- dropdownContain -->
</li> <!-- drop -->
<li class="drop">
<span>T</span>OPmenu6
<div class="dropdownContain">
<div class="dropOut">
<!--<div class="triangle"></div>-->
<ul>
<li>TOPmenu6Sub1</li>
<li>TOPmenu6Sub2</li>
</ul>
</div> <!-- dropOut -->
</div> <!-- dropdownContain -->
</li> <!-- drop -->
<li class="drop">
<span>T</span>OPmenu7
<div class="dropdownContain">
<div class="dropOut">
<!--<div class="triangle"></div>-->
<ul>
<li>TOPmenu7Sub1</li>
<li>TOPmenu7Sub2</li>
<li>TOPmenu7Sub3</li>
</ul>
</div> <!-- dropOut -->
</div> <!-- dropdownContain -->
</li> <!-- drop -->
</ul>
</nav>
</div><!-- menu -->
</body>
</html>
One way is to add the following to .dropOut ul
background: #239976;
margin-bottom: -10px;
margin-top: 10px;
http://jsfiddle.net/myajouri/sxfxs/1/