Showing posts with label css3. Show all posts
Showing posts with label css3. Show all posts

Monday, 12 November 2012

Scrolling bar for blogger as look like Google+ one on site

Want change scrolling bar in blogger site etc, as look like Google site having don’t need any JavaScript or any other thing just CSS copy and paste the code in blogger editor or in your site

Many websites used the same design for scrollbar with different techniques, some with JQuery or etc. Many blogger users also wanted to use the same design for their blog but they were helpless as most of the blogger users just have basic knowledge of web languages so it was difficult for them to make such design on their own.
::-webkit-scrollbar {
width: 15px;
}

::-webkit-scrollbar-track {
background: #FFFFFF;
-webkit-box-shadow: inset 1px 1px 2px #E0E0E0;   
border: 1px solid #D8D8D8;
}
::-webkit-scrollbar-thumb {
background: #646464;
-webkit-box-shadow: inset 1px 1px 2px rgba(155, 155, 155, 0.4);  
}
::-webkit-scrollbar-thumb:hover {
background: #00a0b1;
}
::-webkit-scrollbar-thumb:active {
background: #00a0b1;
-webkit-box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3);
::-moz-scrollbar {
width: 15px;
}
::-moz-scrollbar-track {
background: #FFFFFF;
-moz-box-shadow: inset 1px 1px 2px #E0E0E0;   
border: 1px solid #D8D8D8;
}
::-moz-scrollbar-thumb {
background: #646464;
-moz-box-shadow: inset 1px 1px 2px rgba(155, 155, 155, 0.4);  
}
::-moz-scrollbar-thumb:hover {
background: #00a0b1;
}
::-moz-scrollbar-thumb:active {
background: #00a0b1;
-moz-box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3);

Thursday, 8 November 2012

Image With Sliding Description Panel Using CSS3 For Blogger

This is best CSS3 trick to add an animated description panel to images that slides open when the mouse rolls over the image using CSS3 transitions.If you want to add some description to any image then this trick will surely help you,when any visitor mouse hovers on image the animated panel smoothly comes out with description which you have added.The biggest advantage of this trick is it works with a pure CSS3 i.e. no any heavy JavaScript or any jQuery which can affects loading speed of your blog.Below are the some best feature of this CSS3 trick -

  1. Works with pure CSS3 i.e. no any heavy scripts is needed
  2. Can be use in 4 ways (Up,Down,Left,Down)
  3. Smooth hover effect.
  4. Easy to use and some other features.
First we will add CSS code to blog,follow below instruction to add css code,

  1. First go to Blogger Dashboard > Template
  2. Click On Edit HTML 
  3. Hit Proceed button
  4. Now find for below code in your template
]]></b:skin>



/*================ Sliding Description Panel For Images By HelperBlogger ================*/

.imagepluscontainer {
 /* main image container */
    position: relative;
    z-index: 1;
    font-family: verdana;
    font-size: 13px;
}

.imagepluscontainer img {
 /* CSS for image within container */
    position: relative;
    z-index: 2;
    -moz-transition: all 0.5s ease;
 /* Enable CSS3 transition on all props */
    -webkit-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    -ms-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
}

.imagepluscontainer:hover img {
 /* CSS for image when mouse hovers over main container */
    -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    -moz-transform: scale(1.05, 1.05);
    -webkit-transform: scale(1.05, 1.05);
    -ms-transform: scale(1.05, 1.05);
    -o-transform: scale(1.05, 1.05);
    transform: scale(1.05, 1.05);
}

.imagepluscontainer div.desc {
 /* CSS for desc div of each image. */
    position: absolute;
    width: 90%;
    z-index: 1;
 /* Set z-index to that less than image's, so it's hidden beneath it */
    bottom: 0;
 /* Default position of desc div is bottom of container, setting it up to slide down */
    left: 5px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.8);
 /* black bg with 80% opacity */
    color: white;
    -moz-border-radius: 0 0 8px 8px;
 /* CSS3 rounded borders */
    -webkit-border-radius: 0 0 8px 8px;
    border-radius: 0 0 8px 8px;
    opacity: 0;
 /* Set initial opacity to 0 */
    -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
 /* CSS3 shadows */
    -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    -moz-transition: all 0.5s ease 0.5s;
 /* Enable CSS3 transition on desc div. Final 0.5s value is the delay before animation starts */
    -webkit-transition: all 0.5s ease 0.5s;
    -o-transition: all 0.5s ease 0.5s;
    -ms-transition: all 0.5s ease 0.5s;
    transition: all 0.5s ease 0.5s;
}

.imagepluscontainer div.desc a {
    color: white;
}

.imagepluscontainer:hover div.desc {
 /* CSS for desc div when mouse hovers over main container */
    -moz-transform: translate(0, 100%);
    -webkit-transform: translate(0, 100%);
    -ms-transform: translate(0, 100%);
    -o-transform: translate(0, 100%);
    transform: translate(0, 100%);
    opacity: 1;
 /* Reveal desc DIV fully */
}

/*### Below CSS when applied to desc DIV slides the desc div from the right edge of the image ###*/

.imagepluscontainer div.rightslide {
    width: 150px;
 /* reset from default */
    top: 15px;
    right: 0;
    left: auto;
  /* reset from default */
    bottom: auto;
  /* reset from default */
    padding-left: 15px;
    -moz-border-radius: 0 8px 8px 0;
    -webkit-border-radius: 0 8px 8px 0;
    border-radius: 0 8px 8px 0;
}

.imagepluscontainer:hover div.rightslide {
    -moz-transform: translate(100%, 0);
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    -o-transform: translate(100%, 0);
    transform: translate(100%, 0);
}

/*### Below CSS when applied to desc DIV slides the desc div from the left edge of the image ###*/

.imagepluscontainer div.leftslide {
    width: 150px;
  /* reset from default */
    top: 15px;
    left: 0;
    bottom: auto;
  /* reset from default */
    padding-left: 15px;
    -moz-border-radius: 8px 0 0 8px;
    -webkit-border-radius: 8px 0 0 8px;
    border-radius: 8px 0 0 8px;
}

.imagepluscontainer:hover div.leftslide {
    -moz-transform: translate(-100%, 0);
    -webkit-transform: translate(-100%, 0);
    -ms-transform: translate(-100%, 0);
    -o-transform: translate(-100%, 0);
    transform: translate(-100%, 0);
}

/*### Below CSS when applied to desc DIV slides the desc div from the top edge of the image ###*/

.imagepluscontainer div.upslide {
    top: 0;
    bottom: auto;
  /* reset from default */
    padding-bottom: 10px;
    -moz-border-radius: 8px 8px 0 0;
    -webkit-border-radius: 8px 8px 0 0;
    border-radius: 8px 8px 0 0;
}

.imagepluscontainer:hover div.upslide {
    -moz-transform: translate(0, -100%);
    -webkit-transform: translate(0, -100%);
    -ms-transform: translate(0, -100%);
    -o-transform: translate(0, -100%);
    transform: translate(0, -100%);
}
/*================ Sliding Description Panel For Images By HelperBlogger ================*/




How To Use It?

While editing post,
  1.  Go to Edit HTML tab 
  2. Add below below code,
<center><div class="imagepluscontainer" style="width:263px;"> <img src="IMAGE URL HERE"> <div class="desc downslide"> ADD YOUR DESCRIPTION HERE </div> </div></center>
  1. Now replace ADD YOUR DESCRIPTION HERE with your description,you can also add links in your description by using this code <a herf="LINK HERE">TEXT HERE</a>
  2. Replace IMAGE URL HERE with your image URL
  3. If you want to change position of sliding panel then just replace highlighted down withup,right or left
  4. Adjust the width of the panel according to image width to adjust width of panel simply edit width:263px;

Wednesday, 7 November 2012

How to make popular post image and profile image rounded in blogger


To look your blog more attractive and cool add profile picture and post picture looking round that make a part of design your blog. If you know about css (design)  easily  make out this you don’t know, then don’t worry about that just copy paste the given code

Two ways to add design of css for make your image look round
  1. Login blogger account
  2. Edit html
  3. Press ctrl+f and type  <b:skin><![CDATA[
  4. copy and paste this code after this line  <b:skin><![CDATA[
  5. img{border-radius:50%;} keep more than 40 or 50% that look exact circle


Second method is: 
Step 1:
Log-in to your blogger account
Step 2:
Go to template and click customize
Step 3:
Select advanced and css
Step 4:
Add this code to in css editor window

img{border-radius:50%;}




Sunday, 29 July 2012

Multiple Shadows in CSS3

You don’t have to limit yourself to a single shadow—text-shadow’s syntax supports adding multiple shadows to a text node. Just supply extra values to the property, using commas to separate them, like so:
E { text-shadow: value, value, value; }
The CSS for these examples is shown here. The first example has a class of one, and the second has a class of two. Note that I’ve indented them for clarity.
.one {
    text-shadow:
    0 -2px 3px #FFF,
    0 -4px 3px #AAA,
    0 -6px 6px #666,
    0 -8px 9px #000;
}
.two {
    color: #FFF;
    text-shadow:
    0 2px rgba(0,0,0,0.4),
    0 4px rgba(0,0,0,0.4),
    0 6px rgba(0,0,0,0.4),
    0 8px 0 rgba(0,0,0,0.4);
}
I’ve kept the x-offset at 0 while increasing the y-offset’s negative value from –2px to –8px. The blur-radius increases from 3px to 9px, and the color gets gradually darker, creating a ghostly pale outline behind the characters, which becomes a darker shadow as it gets further from the characters. In the second example, the x-offset also remains consistent, but this time the y-offset increases its value positively. Because the blur-radius isn’t specified, it stays at zero. Here I’ve used the rgba() color function so the color stays the same but is partially transparent, creating an overlapping effect. Although the value changes are fairly small, the visual difference between the two elements is quite profound.

Applying Dimensional Effects: text-shadow in CSS3

The ability to apply drop shadows to text using the text-shadow property has
been around for a long time; Safari first implemented it in version 1.1, which
was released in 2005. So you might be wondering why I am discussing it in a
book on CSS3. As with the font properties in the previous chapter, text-shadow

was dropped from CSS2.1 due to lack of implementation, but this property
has been reinstated in the CSS3 spec and recently implemented in Firefox
and Opera.

The position of the shadow is set using the x and y coordinates that I just
introduced. The simplest form of the syntax accepts two values: x to set the
horizontal distance from the text (known as the x-offset) and y to set the verti-
cal distance (the y-offset):

E { text-shadow: x y; }

By default, the shadow will be the color that it inherited from its parent
(usually black), so if you want to specify a different color, you need to pro-
vide a value for that, such as:

E { text-shadow: x y color; }

Here’s an example of a gray (hex code #BBB) drop shadow located 3px to
the right and 3px down from the original image:

h1 { text-shadow: 3px 3px #BBB; }


You don’t have to provide positive integers as offset values; you can use
both 0 (zero) and negative numbers to get different effects. Here are a few
examples:

.one { text-shadow: -3px -3px #BBB; }
.two { text-shadow: -5px 3px #BBB; }
.three { text-shadow: -5px 0 #BBB; }


The first (top) example uses negative values for both axes, so the shadow
is rendered above and to the left of the text. The next (middle) example uses
a negative value for the x-axis and a positive value for the y, so the shadow
renders below and to the left. The final (bottom) example has a negative
value for the x and a value of 0 for y, so the shadow renders to the left and on
the same baseline.

Understanding Axes and Coordinates in CSS3

One syntax concept that’s new to CSS3 is that of the axis (or axes when you
have more than one). You may know all about axes if you remember your
math lessons, but if you’re reading this section, I’ll assume you need a refresher.
CSS uses the Cartesian coordinate system, which consists of two lines, one
horizontal and one vertical, that cross each other at a right angle. Each of
these lines is an axis: The horizontal line is known as the x-axis, and the vertical
line is known as the y-axis. The point where the two lines meet is called the
origin.




For onscreen items, you measure the lengths of these axes in pixels. In
Figure 6-1, you can see the axes and origin are overlaid on a grid. Imagine
that each square corresponds to a single pixel. You’ll also notice positive (+)
and negative (–) labels at either end of each axis; these tell you that the dis-
tance away from the origin will be measured either positively or negatively in
this direction.
Now that you understand this concept, you can find the coordinates of
any point relative to the origin. The coordinates are a pair of values—one for
each axis—which indicate the distance from the origin. The origin has coor-
dinates (0, 0). For example, given the coordinates (4, 5) you would find the
point by moving 4 pixels along the x-axis, and 5 pixels along the y-axis. Likewise,

the coordinates (–3, –1) indicate a point 3 pixels in a negative direction
away from the origin along the x-axis and 1 pixel away from the origin in a
negative direction along the y-axis.


If this all sounds terribly complicated, don’t worry—you’ve been using the
Cartesian coordinate system already with properties like background-position;
you just didn’t realize it yet.
In CSS, all elements have a height and a width, each of which is a stated
number of pixels in length (even when using other length units such as em or
a percentage). The height and width together creates a pixel grid; for example,
an element that is 10px by 10px in size has a pixel grid of 100px. If you con-
sider that the origin of the element is at the top-left corner, then the two
positional values for properties like background-position correspond exactly to
the x and y coordinates.

TRANSITIONING ALL POSSIBLE PROPERTIES In CSS3

An alternative to listing multiple properties is using the all
value. This will transition all available properties.
Let’s drop all into our simple example instead of listing
background and color separately. They’ll now share the
same duration and timing function.


a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all  0.3s ease;
  }
a.foo:hover,
a.foo:focus {
  color: #030;
  background: #690;
  }
This is a convenient way of catching all the changes that hap-
pen on :hover, :focus, or :active events without having to
list each property you’d like to transition.

Transitioning states in CSS3

I remember being slightly confused when I first started play-
ing around with CSS Transitions. Wouldn’t it make more
sense if the transition properties were placed in the :hover
declaration, since that’s the trigger for the transition? The an-
swer is that there are other possible states of an element be-
sides :hover, and you’ll likely want that transition to happen
on each of those without duplication.
For instance, you may want the transition to also happen
on the :focus or :active pseudo-classes of the link as well.
Instead of having to add the transition property stack to each
of those declarations, the transition instructions are attached
to the normal state and therefore declared only once.
The following example adds the same background switch to
the :focus state. This enables triggering the transition from
either hovering over or focusing the link (via the keyboard, for
example).
a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition: background 0.3s ease;
  -moz-transition: background 0.3s ease;
  -o-transition: background 0.3s ease;
  transition: background 0.3s ease;
  }
a.foo:hover,
a.foo:focus {
  background: #690;
  }


TRANSITIONING MULTIPLE PROPERTIES
Let’s say that along with the background color, we also want
to change the link’s text color and transition that as well. We
can do that by stringing multiple transitions together, sepa-
rated by a comma. Each can have their varying duration and
timing functions (fig 2.03). (Line wraps marked ».)
a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition: background .3s ease, »
    color 0.2s linear;
  -moz-transition: background .3s ease, »
    color 0.2s linear;
  -o-transition: background .3s ease, color 0.2s linear;
  transition: background .3s ease, color 0.2s linear;
  }
a.foo:hover,
a.foo:focus {
  color: #030;
  background: #690;
  }

Timing functions

The timing function value allows the speed of the transition
to change over time by defining one of six possibilities: ease,
linear, ease-in, ease-out, ease-in-out, and cubic-bezier
(which allows you to define your own timing curve).


If you slept through geometry in high school like I did, don’t
worry. I recommend simply plugging in each of these timing
function values to see how they differ.
For our simple example, the duration of the transition is so
quick (just a mere 0.3 seconds) that it’d be difficult to tell the
difference between the six options. For longer animations, the
timing function you choose becomes more of an important
piece of the puzzle, as there’s time to notice the speed changes
over the length of the animation.
When in doubt, ease (which is also the default value) or
linear should work just fine for short transitions.

DELAYING THE TRANSITION


Going back to our example, transitions can be delayed from
the moment the trigger happens on screen. For example, let’s
say we wanted the background transition to happen half a
second after the link is hovered over. We can do that using the
transition-delay property.
a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition-property: background;
  -webkit-transition-duration: 0.3s;
  -webkit-transition-timing-function: ease;
  -webkit-transition-delay: 0.5s;
  }
a.foo:hover {
  background: #690;
  }


SHORTHAND TRANSITIONS



We could simplify the (non-delayed) declaration significantly
by using the transition shorthand property, which is the syn-
tax we’ll be using in the examples later in the book.
a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition: background 0.3s ease;
  }
a.foo:hover {
  background: #690;
  }
Now we have a much more compact rule that accomplishes
the same result.



Shorthand transition with a delay
If we wanted to add back in the half-second delay to the short-
hand version of the transition, we can do that by placing the
duration value at the end of the rule, like this:
a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition: background 0.3s ease 0.5s;
  }
a.foo:hover {
  background: #690;
  }
Now sure, all of this wonderful transitioning works just fine
in WebKit browsers, but what about the others?




BUILDING THE FULL TRANSITION STACK
Here’s a revised declaration, adding the –moz- and –o- prefixes
as well as the actual CSS3 transition property. Again, we’re
putting the non-prefixed property last in the stack to ensure
that the final implementation will trump the others as the
property moves from draft to finished status.
a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition: background 0.3s ease;
  -moz-transition: background 0.3s ease;
  -o-transition: background 0.3s ease;
  transition: background 0.3s ease;
  }
a.foo:hover {
  background: #690;
  }
With that stack, we’ll be smoothing out that background
color change in current versions of Safari, Chrome, and Opera, as well as future versions of any browser that chooses
to support it

transition effect,transition button color in css3

Let’s start with a simple example, where we’ll add a transition
to the background color swap of a link. When hovered over,
the link’s background color will change, and we’ll use a tran-
sition to smooth out that change—an effect previously only
possible using Flash or JavaScript, but now possible with a
few simple lines of CSS3.


The markup is a simple hyperlink, like so:

<a href="#" class="foo"> Transfer color here</a>

Next, we’ll add a declaration for the normal link state with a
little padding and a light green background, followed by the
background swap to a darker green on hover

a.foo {
  padding: 5px 10px;
  background: #9c3;
  }
a.foo:hover {
  background: #690;
  }


Now let’s add a transition to that background color change.
This will smooth out and animate the difference over a speci-
fied period of time
For the time being, we’ll use only the vendor-prefixed proper-
ties which currently work in WebKit-based browsers (Safari
and Chrome) to keep things simple. Later, we’ll add vendor
prefixes for Mozilla and Opera.




a.foo {
  padding: 5px 10px;
  background: #9c3;
  -webkit-transition-property: background;
  -webkit-transition-duration: 0.3s;
  -webkit-transition-timing-function: ease;
  }
a.foo:hover {
  background: #690;
  }