Blogroll

photoshop cs6 html 5 css php seo backlinks

adsense

Smarty Template Engine Step by Step Tutorial

Smarty has focused on how to help you make an high-performance, scalability, security and future growth application.

JavaScript was designed to add interactivity to HTML pages

JavaScript’s official name is ECMAScript, which is developed and maintained by the ECMA International organization.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Monday, 24 February 2014

What is Smarty?Why use Smarty?Where You can get it?

When doing web application development, it is important to make the separation between display design (presentation) work and creating application. Simply, you can create content before without having to consider display (presentation layer). Or, you can design the look without the care of application code. This is role that Smarty Templates want to play.
At first, Smarty want to act as 'Template Engine'. However, now they claim that not only as template engine. Smarty is a template/presentation framework. The word Framework refers to the smarty is no longer a simple tag of a template engine. He has focused on how to help you make an high-performance, scalability, security and future growth application.

So, What is Smarty?

  • Framework that concentrates on the separation of presentation layer

Why use Smarty?

  • Framework that allows you to separate between designing and writing job applications code
  • Quick and painless development

Where You can get it?

You can download from their official web: Smarty.net

CSS and Javascript Animated Box free tutorial

Definition and Usage

The animation property is a shorthand property for six of the animation properties:
animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-direction.
Note: Always specify the animation-duration property, otherwise the duration is 0, and will never be played.

Property Values

ValueDescription
animation-nameSpecifies the name of the keyframe you want to bind to the selector
animation-durationSpecifies how many seconds or milliseconds an animation takes to complete
animation-timing-functionSpecifies the speed curve of the animation
animation-delaySpecifies a delay before the animation will start
animation-iteration-countSpecifies how many times an animation should be played
animation-directionSpecifies whether or not the animation should play in reverse on alternate cycles
animation-fill-modeSpecifies what values are applied by the animation outside the time it is executing
animation-play-stateSpecifies whether the animation is running or paused
initialSets this property to its default value.
inheritInherits this property from its parent element. 

<html>
<head>
<style>
#myDIV
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 1s infinite;
-webkit-animation:mymove 1s infinite; /*Safari and Chrome*/
}

@keyframes mymove
{
from {left:0px;}
to {left:200px;}
}

@-webkit-keyframes mymove /*Safari and Chrome*/
{
from {left:0px;}
to {left:200px;}
}
@keyframes mynewmove
{
from {top:0px;}
to {top:200px;}
}

@-webkit-keyframes mynewmove /*Safari and Chrome*/
{
from {top:0px;}
to {top:200px;}
}
</style></head>
<body>

<p>Click the "Try it" button to change the value of the animation property.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction()
{
document.getElementById("myDIV").style.animation = "mynewmove 4s 2";
document.getElementById("myDIV").style.WebkitAnimation = "mynewmove 4s 2"; // Code for Chrome and Safari
}
</script>

<p><strong>Note:</strong> The animation property is not supported in Internet Explorer 9 and earlier versions.</p>

<div id="myDIV"></div>

</body>
</html>

Text Shadow and Word wrapping with CSS free tutorial

CSS3 Text Shadow

In CSS3, the text-shadow property applies shadow to text.
Text shadow effect!
You specify the horizontal shadow, the vertical shadow, the blur distance, and the color of the shadow:
Example
h1
{
text-shadow: 5px 5px 5px #FF0000;
}

CSS3 Word Wrapping

If a word is too long to fit within an area, it expands outside:
This paragraph contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.
In CSS3, the word-wrap property allows you to force the text to wrap - even if it means splitting it in the middle of a word:
This paragraph contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.
The CSS code is as follows:

Example

Allow long words to be able to break and wrap onto the next line:
p {word-wrap:break-word;}

CSS3 Text Properties

PropertyDescriptionCSS
hanging-punctuationSpecifies whether a punctuation character may be placed outside the line box3
punctuation-trimSpecifies whether a punctuation character should be trimmed3
text-align-lastDescribes how the last line of a block or a line right before a forced line break is aligned when text-align is "justify"3
text-emphasisApplies emphasis marks, and the foreground color of the emphasis marks, to the element's text3
text-justifySpecifies the justification method used when text-align is "justify"3
text-outlineSpecifies a text outline3
text-overflowSpecifies what should happen when text overflows the containing element3
text-shadowAdds shadow to text3
text-wrapSpecifies line breaking rules for text3
word-breakSpecifies line breaking rules for non-CJK scripts3
word-wrapAllows long, unbreakable words to be broken and wrap to the next line3

How to use transitions? How does it work?

If you haven't used transitions before, here's a brief introduction.
On the element you want to have animate, add the following CSS:
  1. #id_of_element {
  2. -webkit-transition: all 1s ease-in-out;
  3. -moz-transition: all 1s ease-in-out;
  4. -o-transition: all 1s ease-in-out;
  5. transition: all 1s ease-in-out;
  6. }
There is a lot of duplication due to vendor prefixes - until the specification if finalised, this will persist. If this bothers you, there are various tools such as CSS ScaffoldLESS, or my preference - SASS, that allow you to define mixins to avoid repetitive code.
Another approach is simply to write the CSS without the prefixes, then use Lea Verou's -prefix-free to add them in at runtime.
Something you definitely shouldn't do is to only include the webkit prefix. Tempting though it seems, particularly when developing for mobile devices, webkit isn't the only rendering engine!
It's worth noting as well that there isn't an -ms- prefix on these properties. IE10 was the first browser to ship without a prefix on these. The betas of IE10 did use the prefix however, so you may see code using -ms-. It's not needed though.
The syntax is pretty straightforward, you specify the property you want to animate, all or border-radius or color or whatever, the time to run, then the transition timing function. The options for the timing function are shown below.
Whenever any property changes, then it will animate instead of changing directly. This can be due to a different set of properties set on a pseudo class such as hover, or a new class or properties set by javascript. The example below uses :hover to change the properties – no javascript is needed.
To see the difference in speed, have a look at the speed test.

Different timing functions

Ease
Ease
In
Ease
Out
Ease
In Out
Linear
Custom
Awesome!
Hover on me
In addition to the built in timing functions, you can also specify your own. The excellent Ceaser CSS Easing Tool makes this very easy.
It's worth noting that the curves you produce can have negative values in them. The bezier curve for the last box above iscubic-bezier(1.000, -0.530, 0.405, 1.425), the negative values are causing it to 'take a run up', which looks pretty awesome!

Delays

The syntax for a CSS3 transition is of the form:
transition:  [ <transition-property> ||
               <transition-duration> ||
               <transition-timing-function> ||
               <transition-delay> ]
You will notice the final parameter is a delay - this let's you trigger things after an event has occurred. Below is a small demo showing this functionality.

Transition delays

Hover on me
This works by just adding a delay to each of the different circles. This is as easy as adding a transition-delay: 0.6s; to the element.

Advanced delays

You can set the way different properties animate differently. In this example the normal (blue) circle has this CSS (with the appropriate vendor prefixes):
  1. #dd_main2 {
  2. transition: all 1s ease-in-out;
  3. }
The 'Example 1' (green) circle has this CSS instead:
  1. #dd_main2 {
  2. transition-property: top, left;
  3. transition-duration: 1s, 1s;
  4. transition-delay: 0s, 1s;
  5. }
While the 'Example 2' (red) circle has this CSS instead:
  1. #dd_main2 {
  2. transition-property: top, left, border-radius, background-color;
  3. transition-duration: 2s, 1s, 0.5s, 0.5s;
  4. transition-delay: 0s, 0.5s, 1s, 1.5s;
  5. }
This allows us to animate the properties independently of each other, meaning that this simple technique can be used to create very complex animations.
Normal
Example 1
Example 2
Hover on me

Animatable properties

Regarding the properties you can animate, the best way is to experiment. The W3C maintain a list of properties that can be animated on the CSS Transitions spec. These include everything from background-color and letter-spacing to text-shadow and min-height. Many of these properties are not supported by default by jQuery animation, making CSS transitions much more useful out of the box. In addition, many browsers hardware accelerate animations that don't require repaints, namely opacity, 3D transforms and filters. To see the methods that Webkit accelerates, take a look at the AnimationBase.cpp code from the Webkit source. At the time of writing there are three classes defined here: PropertyWrapperAcceleratedOpacity,PropertyWrapperAcceleratedTransform and PropertyWrapperAcceleratedFilter. These are the animations that Webkit accelerates. Other browsers do things differently, but as Webkit is popular on mobile where these things matter most, it's worth noting this special case.
In reality, browsers are allowing more properties than these to be animated - box-shadow springs to mind as an obvious example. The table below is taken from the link above, and can be considered the minimum number of properties you would expect to be animatable.
Property NameType
background-colorcolor
background-imageonly gradients
background-positionpercentage, length
border-bottom-colorcolor
border-bottom-widthlength
border-colorcolor
border-left-colorcolor
border-left-widthlength
border-right-colorcolor
border-right-widthlength
border-spacinglength
border-top-colorcolor
border-top-widthlength
border-widthlength
bottomlength, percentage
colorcolor
croprectangle
font-sizelength, percentage
font-weightnumber
grid-*various
heightlength, percentage
leftlength, percentage
letter-spacinglength
line-heightnumber, length, percentage
margin-bottomlength
margin-leftlength
margin-rightlength
margin-toplength
max-heightlength, percentage
max-widthlength, percentage
min-heightlength, percentage
min-widthlength, percentage
opacitynumber
outline-colorcolor
outline-offsetinteger
outline-widthlength
padding-bottomlength
padding-leftlength
padding-rightlength
padding-toplength
rightlength, percentage
text-indentlength, percentage
text-shadowshadow
toplength, percentage
vertical-alignkeywords, length, percentage
visibilityvisibility
widthlength, percentage
word-spacinglength, percentage
z-indexinteger
zoomnumber
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:red;
transition:width 1s linear 2s;
/* Safari */
-webkit-transition:width 1s linear 2s;
}

div:hover
{
width:200px;
}
</style>
</head>
<body>

<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>

<div></div>

<p>Hover over the div element above, to see the transition effect.</p>
<p><b>Note:</b> The transition effect will wait 2 seconds before starting.</p>

</body>
</html>