Set the text cases:
Following is the example which demonstrates how to set the cases for a text. Possible values are none, capitalize, uppercase, lowercase..<p style="text-transform:capitalize;"> This will be capitalized </p>
<p style="text-transform:uppercase;"> This will be in uppercase </p>
<p style="text-transform:lowercase;"> This will be in lowercase </p>
This will produce following result:
This will be capitalized
This will be in uppercase
This will be in lowercase
Set the white space between text:
Following is the example which demonstrates how white space inside an element is handled. Possible values are normal, pre, nowrap.<p style="white-space:pre;">This text has a line break and the white-space pre setting tells the browser to honor it just like the HTML pre tag.</p>
This will produce following result:
This text has a line break
and the white-space pre setting tells the browser to honor it
just like the HTML pre tag.
Set the text shadow:
Following is the example which demonstrates how to set the shadow around a text. This may not be supported by all the browsers.<p style="text-shadow:4px 4px 8px blue;"> If your browser supports the CSS text-shadow property, this text will have a blue shadow.</p>
This will produce following result:
If your browser supports the CSS text-shadow property, this text will have a blue shadow.
CSS – Images
Images are very important part of any Web Page. Though it is not recommended to include lot of images but it is still important to use good images wherever it is required.
CSS plays a good role to control image display. You can set following image properties using CSS.
- The border property is used to set the width of an image border.
- The height property is used to set the height of an image.
- The width property is used to set the width of an image.
- The -moz-opacity property is used to set the opacity of an image.
The image border Property:
The border property of an image is used to set the width of an image border. This property can have a value in length or in %.A width of zero pixels means no border.
Here is the example:
<img style="border:0px;" src="/images/css.gif" /> <br /> <img style="border:3px dashed red;" src="/images/css.gif" />
This will produce following result:
The image height Property:
The height property of an image is used to set the height of an image. This property can have a value in length or in %. While giving value in %, it applies it in respect of the box in which an image is available.Here is the example:
<img style="border:1px solid red; height:100px;" src="/images/css.gif" /> <br /> <img style="border:1px solid red; height:50%;" src="/images/css.gif" />
This will produce following result:
The image width Property:
The width property of an image is used to set the width of an image. This property can have a value in length or in %. While giving value in %, it applies it in respect of the box in which an image is available.Here is the example:
<img style="border:1px solid red; width:50px;" src="/images/css.gif" /> <br /> <img style="border:1px solid red; width:30%;" src="/images/css.gif" />
This will produce following result:
The -moz-opacity Property:
The -moz-opacity property of an image is used to set the opacity of an image. This property is used to create a transparent image in Mozilla. IE uses filter:alpha(opacity=x) to create transparent images.In Mozilla (-moz-opacity:x) x can be a value from 0.0 - 1.0. A lower value makes the element more transparent (The same things goes for the CSS3-valid syntax opacity:x).
In IE (filter:alpha(opacity=x)) x can be a value from 0 - 100. A lower value makes the element more transparent.
Here is the example:
<img style="border:1px solid red;-moz-opacity:0.4;filter:alpha(opacity=40);" src="/images/css.gif" />
This will produce following result:
No comments:
Post a Comment