Web Analytics Made Easy - StatCounter
FoulsCode

Εμφάνιση αναρτήσεων με ετικέτα CSS3. Εμφάνιση όλων των αναρτήσεων
Εμφάνιση αναρτήσεων με ετικέτα CSS3. Εμφάνιση όλων των αναρτήσεων

20 Νοεμβρίου 2017

Animated radial / circular menu




Αντικαταστήστε τα δικά σας URL που οδηγούν στα δικά σας social.



HTML:





<nav class="circular-menu">

  <div class="circle">
    <a href="URL" class="fa fa-home fa-2x"></a>
    <a href="URL" class="fa fa-facebook fa-2x"></a>
    <a href="URL" class="fa fa-twitter fa-2x"></a>
    <a href="URL" class="fa fa-linkedin fa-2x"></a>
    <a href="URL" class="fa fa-github fa-2x"></a>
    <a href="URL" class="fa fa-rss fa-2x"></a>
    <a href="URL" class="fa fa-pinterest fa-2x"></a>
    <a href="URL" class="fa fa-asterisk fa-2x"></a>
  </div>
  
  <a href="URL" class="menu-button fa fa-bars fa-2x"></a>

</nav>

<h1 class="author">FoulsCode.com by <a href="http://creative-punch.net" target="_blank">Creative Punch</h1>

CSS:

/* Demo by http://creative-punch.net */
/* http://foulscode.com */

@import "https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css";

body {
  background: #39D;
}

.circular-menu {
  width: 250px;
  height: 250px;
  margin: 0 auto;
  position: relative;
}

.circle {
  width: 250px;
  height: 250px;
  opacity: 0;
  
  -webkit-transform: scale(0);
  -moz-transform: scale(0);
  transform: scale(0);

  -webkit-transition: all 0.4s ease-out;
  -moz-transition: all 0.4s ease-out;
  transition: all 0.4s ease-out;
}

.open.circle {
  opacity: 1;

  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  transform: scale(1);
}

.circle a {
  text-decoration: none;
  color: white;
  display: block;
  height: 40px;
  width: 40px;
  line-height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  position: absolute;
  text-align: center;

}

.circle a:hover {
  color: #eef;
}

.menu-button {
  position: absolute;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  text-decoration: none;
  text-align: center;
  color: #444;
  border-radius: 50%;
  display: block;
  height: 40px;
  width: 40px;
  line-height: 40px;
  padding: 10px;
  background: #dde;
}

.menu-button:hover {
  background-color: #eef;
}

/* Author stuff */
h1.author {
  text-align:center;
  color: white;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 300;
}

h1.author a {
  color: #348;
  text-decoration:none;
}

h1.author a:hover {
  color: #ddd;



jQuery:

// http://foulscode.com

var items = document.querySelectorAll('.circle a');

for(var i = 0, l = items.length; i &lt; l; i++) {
  items[i].style.left = (50 - 35*Math.cos(-0.5 * Math.PI - 2*(1/l)*i*Math.PI)).toFixed(4) + "%";
  
  items[i].style.top = (50 + 35*Math.sin(-0.5 * Math.PI - 2*(1/l)*i*Math.PI)).toFixed(4) + "%";
}

document.querySelector('.menu-button').onclick = function(e) {
   e.preventDefault(); document.querySelector('.circle').classList.toggle('open');
}

Διαβάστε Περισσότερα »

16 Νοεμβρίου 2017

CSS3/Javascript Pure Dropdown Menu


Ένα πολύ όμορφο menu αναδιπλωμένο με κυλήσει μονο όταν κανεις κλικ στο menu ανοίγουν προς τακάτω η υποκατηγορίες, που έχετε τοποθέτηση.

Μπορείτε να αλλάξετε τους συνδέσμους και τους τίτλους του menu και φυσικά να έχετε ανεβάσει τον κώδικα JavaScript στο χώρο και site σας



HTML:

<div class="container">
  <h1 class="title">Dropdown Menu</h1>
  <ul>
    <li class="dropdown">
      <a href="URL" data-toggle="dropdown">First Menu <i class="icon-arrow"></i></a>
      <ul class="dropdown-menu">
        <li><a href="URL">Home</a></li>
        <li><a href="URL">About Us</a></li>
        <li><a href="URL">Services</a></li>
        <li><a href="URL">Contact</a></li>
      </ul>
    </li>
    <li class="dropdown">
      <a href="URL" data-toggle="dropdown">Second Menu <i class="icon-arrow"></i></a>
      <ul class="dropdown-menu">
        <li><a href="URL">Home</a></li>
        <li><a href="URL">About Us</a></li>
        <li><a href="URL">Services</a></li>
        <li><a href="URL">Contact</a></li>
      </ul>
    </li>
    <li class="dropdown">
      <a href="URL" data-toggle="dropdown">Third Menu <i class="icon-arrow"></i></a>
      <ul class="dropdown-menu">
        <li><a href="URL">Home</a></li>
        <li><a href="URL">About Us</a></li>
        <li><a href="URL">Services</a></li>
        <li><a href="URL">Contact</a></li>
      </ul>
    </li>
  </ul>
</div>

CSS3:

@import "compass/css3";

@import url("https://fonts.googleapis.com/css?family=Lato:300,400,700,900");
@import url(https://fonts.googleapis.com/css?family=Pacifico);

body {
font-family: "Lato", Helvetica, Arial;
font-size: 16px;
}

.text-center {
  text-align: center;
}

*, *:before, *:after {
-webkit-border-sizing: border-box;
-moz-border-sizing: border-box;
border-sizing: border-box;
}
/* FOULSCODE.COM */
.container {
width: 350px;
margin: 50px auto;
  
  &amp; &gt; ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
  }
}

// =============================================================================
// foulscode.com
// =============================================================================

$blue: #2980B9;
$gray: #EEE;

@mixin ul-nostyle {
list-style: none;
padding: 0;
margin: 0;
}

@mixin double-shadow($color) {
@include box-shadow(0 1px 0 lighten($color, 10%) inset, 0 -1px 0 darken($color, 10%) inset);
}

@mixin hover-style($color) {
&amp;:hover {
background: lighten($color, 3%);
}
}

@mixin animation($content) {
  animation: $content;
  -moz-animation: $content;
  -webkit-animation: $content;
}

@mixin keyframes($name) {
  @keyframes #{$name} { @content; }
  @-moz-keyframes #{$name} { @content; }
  @-webkit-keyframes #{$name} { @content; }
}

// =============================================================================
// Classes
// =============================================================================

.title {
  font-family: 'Pacifico';
  font-weight: norma;
  font-size: 40px;
  text-align: center;
  line-height: 1.4;
  color: $blue;
}

.dropdown {
a {
text-decoration: none;
}

[data-toggle="dropdown"] {
position: relative;
display: block;
color: white;
background: $blue;
@include double-shadow($blue);
@include hover-style($blue);
@include text-shadow(0 -1px 0 rgba(0,0,0,0.3));
padding: 10px;

}
.icon-arrow {
position: absolute;
display: block;
font-size: 0.7em;
color: #fff;
top: 14px;
right: 10px;

&amp;.open {
@include transform(rotate(-180deg));
@include transition(transform .6s);
}
&amp;.close {
@include transform(rotate(0deg));
@include transition(transform .6s);
}

&amp;:before {
content: '\25BC';
}
}

.dropdown-menu {
max-height: 0;
overflow: hidden;
@include ul-nostyle;

li {
padding: 0;

a {
display: block;
color: darken($gray, 50%);
background: $gray;
@include double-shadow($gray);
@include hover-style($gray);
@include text-shadow(0 -1px 0 rgba(255,255,255,0.3));
padding: 10px 10px;
}
}
}

.show, .hide {
@include transform-origin(50%, 0%);
}

.show {
display: block;
max-height: 9999px;
@include transform(scaleY(1));
@include animation(showAnimation .5s ease-in-out);
@include transition(max-height 1s ease-in-out);
}

.hide {
max-height: 0;
@include transform(scaleY(0));
@include animation(hideAnimation .4s ease-out);
@include transition(max-height .6s ease-out);
}
}

@include keyframes(showAnimation) {
0% {
@include transform(scaleY(0.1));
}
40% {
@include transform(scaleY(1.04));
}
60% {
@include transform(scaleY(0.98));
}
80% {
@include transform(scaleY(1.04));
}
100% {
@include transform(scaleY(0.98));
}
80% {
@include transform(scaleY(1.02));
}
100% {
@include transform(scaleY(1));
}
}

@include keyframes(hideAnimation) {
  0% {
  @include transform(scaleY(1));
  }
  60% {
  @include transform(scaleY(0.98));
  }
  80% {
  @include transform(scaleY(1.02));
  }
  100% {
  @include transform(scaleY(0));
  }
}

JAVASCRIPT:

// Dropdown Menu
var dropdown = document.querySelectorAll('.dropdown');
var dropdownArray = Array.prototype.slice.call(dropdown,0);
dropdownArray.forEach(function(el){
var button = el.querySelector('a[data-toggle="dropdown"]'),
menu = el.querySelector('.dropdown-menu'),
arrow = button.querySelector('i.icon-arrow');

button.onclick = function(event) {
if(!menu.hasClass('show')) {
menu.classList.add('show');
menu.classList.remove('hide');
arrow.classList.add('open');
arrow.classList.remove('close');
event.preventDefault();
}
else {
menu.classList.remove('show');
menu.classList.add('hide');
arrow.classList.remove('open');
arrow.classList.add('close');
event.preventDefault();
}
};
})

Element.prototype.hasClass = function(className) {
    return this.className &amp;&amp; new RegExp("(^|\\s)" + className + "(\\s|$)").test(this.className);
};

Διαβάστε Περισσότερα »

22 Ιουνίου 2017

Responsive and Mega menu





HTML:

<!--Google -Fonts-->
<link href='https://fonts.googleapis.com/css?family=Sintony:400,700&subset=latin-ext' rel='stylesheet' type='text/css'>

<!--Font-awsome-->
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<div class="container">
<header>
<h2>Responsive Menu</h2>
</header>

<div class="xs-menu-cont">
<a id="menutoggle"><i class="fa fa-align-justify"></i> </a>
<nav class="xs-menu displaynone">
<ul>
<li class="active">
<a href="#">Home</a>
</li>
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Team</a>
</li>
<li>
<a href="#">Portfolio</a>
</li>
<li>
<a href="#">Blog</a>
</li>
<li>
<a href="#">Contact</a>
</li>

</ul>
</nav>
</div>
<nav class="menu">
<ul>
<li class="active">
<a href="#">Home</a>
</li>
<li class="drop-down">
<a href="#">Products</a>
 
<div class="mega-menu fadeIn animated">
<div class="mm-6column">
<span class="left-images">
<img  src="https://4.bp.blogspot.com/-faF-AemPFUM/U4ryP7pQRsI/AAAAAAAAEvA/fZ-hskCSln4/s1600/Magento%2Bthemes.jpg">
<p>Most Popular Styles </p>
</span>
<span class="categories-list">
<ul>
<span>Computer</span>
<li>Desktops</li>
<li>Laptops</li>
<li>Tablets</li>
<li>Monitors</li>
<li>Networking Printers</li>
<li>Scanners</li>
<li>Jumpers & Cardigans</li>
<li><a class="mm-view-more" href="#">View more →</a></li>
</ul>
</span>

</div>
<div class="mm-3column">
<span class="categories-list">
<ul>
<span>TV & Video</span>
<li>LED TVs
<li>Plasma TVs
<li>3D TVs
<li>DVD & Blu-ray Players
<li>Home Theater Systems
<li>Cell Phones
<li>Apple iPhone
<li><a class="mm-view-more" href="#">View more →</a></li>
</ul>
</span>
</div>
<div class="mm-3column">
<span class="categories-list">
<ul>
<span>Car Electronics</span>
<li>GPS & Navigation</li>
<li>In-Dash Stereos</li>
<li>Speakers</li>
<li>Subwoofers</li>
<li>Amplifiers</li>
   <li>MP3 Players</li>
<li>iPods</li>
  <li><a class="mm-view-more" href="#">View more →</a></li>
</ul>
</span>
</div>
</div>
 
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Team</a>
</li>
<li>
<a href="#">Portfolio</a>
</li>
<li>
<a href="#">Blog</a>

</li>
<li>
<a target="_blank" href="http://www.foulscode.com/">Contact</a>
</li>
         <li style="float:right;">
           <a href="http://www.foulscode/">Go my Blog</a>
          </li>

</ul>
</nav>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

Αφού βάλετε τα στοιχεια σας στον κώδικα html είστε τιμή για πιο προχωρημένους να το προσαρμόσουν στα μετρα και στα χρώματα που θέλουν.


CSS:


body {
font-family: 'Sintony', sans-serif;
color: #e5e5e5;
font-size: 12px;
background: #bfbfbf;
line-height: 1;
}
*, *:before, *:after {
    box-sizing: border-box;
}
/** * Eric Meyer's Reset CSS v2.0 (https://meyerweb.com/eric/tools/css/reset/) * http://cssreset.com */
html, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
header h2 {
margin: 25px 10px;
font-size: 28px;
text-align: center;
color: cornsilk;
}
.container {
margin: 10px auto;
display: table;
max-width: 1140px;
width: 100%;
}
.container:after, .container:before {
content: "" clear : both;
}
nav.menu {
background: coral;
position: relative;
min-height: 45px;
height: 100%;
}

.menu > ul > li {
list-style: none;
display: inline-block;
color: #fff;
line-height: 45px;

}
.menu > ul li a, .xs-menu li a {
text-decoration: none;
color: #fff;
display:block;
padding: 0px 24px;
}
.menu > ul li a:hover {
background:#444;
color: #fff;
transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-webkit-transition-duration: 0.3s;
}
.active{
background:#444 !important;

}
.displaynone{
display: none;
}
.xs-menu-cont{
display:none;
}
.xs-menu-cont > a {
    background: none repeat scroll 0 0 #ff7f50;
    border-radius: 3px;
    padding: 3px 6px;
display: block;
border-bottom:1px solid #E67248;
   box-shadow: 0 1px 2px #e67248;
-webkit-box-shadow: 0 1px 2px #e67248;
-moz-box-shadow: 0 1px 2px #e67248;
}
.xs-menu-cont > a:hover{
 cursor: pointer;
}
  
.xs-menu li {
color: #fff;
padding: 14px 30px;
border-bottom: 1px solid #ccc;
background: #FF7F50;

}
.xs-menu  a{
text-decoration:none;
}

.mega-menu {
   background: none repeat scroll 0 0 #888;
    left: 0;
    margin-top: 3px;
    position: absolute;
    width: 100%;
padding:15px;
display:none;
transition-duration: 0.9s;
    
}
#menutoggle i {
    color: #fff;
    font-size: 33px;
    margin: 0;
    padding: 0;
}


/*--column--*/
.mm-6column:after, .mm-6column:before, .mm-3column:after, .mm-3column:before{
content:"";
display:table;
clear:both;


}
.mm-6column, .mm-3column {
 float: left;
 position: relative;
 }
.mm-6column {
    width: 50%;
}
.mm-3column {
        width: 25%;
}
.responsive-img {
    display: block;
    max-width: 100%;

}
.left-images{
margin-right:25px;
}
 .left-images, .left-categories-list {
   float: left;
}
.categories-list li {
    display: block;
    line-height: normal;
    margin: 0;
    padding: 5px 0;
}
.categories-list li :hover{
background:inherit !important;
}
.left-images > p {
    background: none repeat scroll 0 0 #ff7f50;
    display: block;
    font-size: 18px;
    line-height: normal;
    margin: 0;
    padding: 5px 14px;
}
.categories-list span {
    font-size: 18px;
    padding-bottom: 5px;
    text-transform: uppercase;
}
.mm-view-more{
background: none repeat scroll 0 0 #ff7f50;
    color: #fff;
    display: inline !important;
    line-height: normal;
    padding: 5px 8px !important;
margin-top:10px;
}
.display-on{
display:block;
 transition-duration: 0.9s;
}
.drop-down > a:after{
content:"\f103";
color:#fff;
font-family: FontAwesome;
font-style: normal;
margin-left: 5px;


}
 /*MediaQuerys*/
 @media (max-width: 600px) {
.menu {
 display:none;
 }
 .xs-menu li a {

padding:0px;
}
 .xs-menu-cont{
 display:block ;
 }
 }


/*Animation--*/

.animated {
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}
@-webkit-keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.fadeIn {
  -webkit-animation-name: fadeIn;
  animation-name: fadeIn;
}


JS:

$(document).ready(function() {
  //responsive menu toggle
  $("#menutoggle").click(function() {
    $(".xs-menu").toggleClass("displaynone");
  });
  //add active class on menu
  $("ul li").click(function(e) {
    e.preventDefault();
    $("li").removeClass("active");
    $(this).addCss("active");
  });
  //drop down menu
  $(".drop-down").hover(function() {
    $(".mega-menu").addClass("display-on");
  });
  $(".drop-down").mouseleave(function() {
    $(".mega-menu").removeClass("display-on");
  });
});




Διαβάστε Περισσότερα »
Related Posts Plugin for WordPress, Blogger...