Showing posts with label CSS3. Show all posts
Showing posts with label CSS3. Show all posts

Friday, May 15, 2015

CSS3 and Jquery Search field Animation

CSS3 and Jquery Search field Animation

This tip is show you how to making a search box using CSS3, Jquery and SVG. It will make your website more interesting.

How to make it:
1. Create a SVG search icon.

  

2. Create a search input.


4. The core CSS/CSS3 styles.
svg {
  position: absolute;
  transform: translateX(-246px);
  width: 600px;
  height: auto;
  stroke-width: 8px;
  stroke: #b3c33a;
  stroke-width: 1px;
  stroke-dashoffset: 0;
  stroke-dasharray: 64.6 206.305;
  transition: all 0.5s ease-in-out;
}

.input-search {
  position: absolute;
  width: calc(100% - 148px);
  height: 64px;
  top: 0;
  right: 20px;
  bottom: 0;
  left: 0;
  border: none;
  background-color: transparent;
  outline: none;
  padding: 20px;
  font-size: 50px;
}

.search-label {
  position: absolute;
  display: block;
  width: 108px;
  height: 108px;
  top: 0;
  left: 50%;
  margin-left: -54px;
  z-index: 100;
  transition: 0.5s ease-in-out;
}

.isActive .search-label { transform: translateX(246px); }

.isActive svg {
  stroke-dashoffset: -65;
  stroke-dasharray: 141.305 65;
  transform: translateX(0);
}

.isActive.full svg {
  stroke-dashoffset: -65;
  stroke-dasharray: 141.305 65;
  transform: translateX(0);
}

.full .search-label { transform: translateX(246px); }

.full svg {
  stroke-dashoffset: 0;
  stroke-dasharray: 64.6 206.305;
  transform: translateX(0);
}

.search {
  position: absolute;
}
5. The jQuery script to enable the animated search field on focus.
var searchField = $('.search');
var searchInput = $("input[type='search']");

var checkSearch = function(){
    var contents = searchInput.val();
    if(contents.length !== 0){
      searchField.addClass('full');
    } else {
      searchField.removeClass('full');
    }
};

$("input[type='search']").focus(function(){
    searchField.addClass('isActive');
  }).blur(function(){
    searchField.removeClass('isActive');
    checkSearch();
});

Demo Download
Read more ...

Tuesday, September 2, 2014

Making shadow rotate using CSS3


Before I make a shadow using image and put in the website, but now in this tutorial I going to make a shadow box using CSS3 rotate under the box as you see the image above.
Read more ...

Tuesday, August 26, 2014

Resources for create tooltips using jquery and CSS


Tooltips are awesome, there’s simply no denying it. They provide a simple, predictable and straightforward way to provide your users with useful, context-sensitive information, and they look cool to boot. According wikipedia, tooltip or infotip or a hint is a common graphical user interface element. It is used in conjunction with a cursor, usually a pointer. The user hovers the pointer over an item, without clicking it, and a tooltip may appear—a small “hover box” with information about the item being hovered over. Tooltip is very useful, as explanatory of a link, an image or a specific word in a website.
Read more ...

Monday, August 25, 2014

CSS folded-corner effect


Create a simple CSS folded-corner effect without images or extra markup. It works well in all modern browsers and is best suited to designs with simple colour backgrounds.
By Nicolas Gallagher you can follow him on twitter. 
Read more ...

Best CSS3 Hover Effect

Best CSS3 Hover Effect

Today I had collect some hover effects for you. I think it will make your site look more awesome and attractive. Some have been featured previously, otherwise enjoy!
Read more ...

Tuesday, August 19, 2014

Beautiful CSS3 button with effects & animations

Beautiful CSS3 button with effects & animations - Share The Cocepts
Are you looking for a beautiful CSS3 button with effects & animations? Here are some of the button I had collected from internet.

Clean Circle buttons
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
Switches inspired by this dribbble shot
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
Christmas Button
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
Button us Unicode symbols
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
Pressable CSS3 Social Buttons
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
Slidey Button
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
CIRCULAR PROGRESS BUTTON
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
Spin Button
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
SWITCHES WITH CHECKBOXES
Beautiful CSS3 button with effects & animations - Share The Concepts
Demo
Read more ...