• HTML INTRODUCTION

    The HTML 5 language has a "custom" HTML syntax that is compatible with HTML 4 and XHTML1 documents published on the Web, but is not compatible with the more esoteric SGML features of HTML 4.

  • JAVASCRIPT Introduction

    JavaScript (JS) is a dynamic computer programming language.

  • Structured Query Language (SQL)

    SQL is a standard language for accessing databases.

  • AJAX INTRODUCTION

    AJAX = Asynchronous JavaScript and XML.

  • ASP

    ASP.NET is a development framework for building web pages and web sites with HTML, CSS, JavaScript and server scripting.

  • Save a lot of work with CSS!

    In our CSS tutorial you will learn how to use CSS to control the style and layout of multiple Web pages all at once.

  • C# (programming language)

    c# (pronounced as see sharp) is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, procedural, generic, object-oriented (class-based), and component-oriented programming disciplines.

  • Java - Overview

    Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).

  • jQuery is a JavaScript Library

    jQuery greatly simplifies JavaScript programming.

  • PHP LANGUAGE PROGRAMMING

    PHP is a server scripting language, and is a powerful tool for making dynamic and interactive Web pages quickly.

  • Introduction to XML

    XML was designed to transport and store data.HTML was designed to display data.

Sunday, February 16, 2014

Posted by amikitinfo
No comments | 8:20 PM

Using Angles

If you want more control over the direction of the gradient, you can define an angle, instead of the predefined directions (to bottom, to top, to right, to left, to bottom right, etc.).

Syntax

background: linear-gradient(angle, color-stop1, color-stop2);
The angle is specified as an angle between a horizontal line and the gradient line, going counter-clockwise. In other words, 0deg creates a bottom to top gradient, while 90deg generates a left to right gradient.
The following example shows how to use angles on linear gradients:

 

Example

<!DOCTYPE html>
<html>
<head>
<style>
#grad1
{
height:100px;
background: -webkit-linear-gradient(0deg, red, blue); /* For Safari */
background: -o-linear-gradient(0deg, red, blue); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(0deg, red, blue); /* For Firefox 3.6 to 15 */
background: linear-gradient(0deg, red, blue); /* Standard syntax (must be last) */
}
#grad2
{
height:100px;
background: -webkit-linear-gradient(90deg, red, blue); /* For Safari */
background: -o-linear-gradient(90deg, red, blue); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(90deg, red, blue); /* For Firefox 3.6 to 15 */
background: linear-gradient(90deg, red, blue); /* Standard syntax (must be last) */
}

#grad3
{
height:100px;
background: -webkit-linear-gradient(180deg, red, blue); /* For Safari */
background: -o-linear-gradient(180deg, red, blue); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(180deg, red, blue); /* For Firefox 3.6 to 15 */
background: linear-gradient(180deg, red, blue); /* Standard syntax (must be last) */
}

#grad4
{
height:100px;
background: -webkit-linear-gradient(-90deg, red, blue); /* For Safari */
background: -o-linear-gradient(-90deg, red, blue); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(-90deg, red, blue); /* For Firefox 3.6 to 15 */
background: linear-gradient(-90deg, red, blue); /* Standard syntax (must be last) */
}
</style>
</head>
<body>

<h3>Linear Gradients - Using Different Angles</h3>
<div id="grad1" style="color:white;text-align:center;">0deg</div><br>
<div id="grad2" style="color:white;text-align:center;">90deg</div><br>
<div id="grad3" style="color:white;text-align:center;">180deg</div><br>
<div id="grad4" style="color:white;text-align:center;">-90deg</div>

<p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support gradients.</p>

</body>
</html>

 

0 comments:

Post a Comment

Hosting Gratis