منتدى طلاب جامعة السودان المفتوحة
اسرة منتدى طلاب جامعة السودان المفتوحة تتمنى لكم اقامة طيبة برفقتها نرجو الدخول اذا كنت عضوا او التسجيل او زر اخفاء للزوار


المدير العام المنتدى : وليد عبدالوهاب احمد
 
الرئيسيةالمنشوراتالتسجيلدخول

شاطر | 
 

 Background Codes

استعرض الموضوع السابق استعرض الموضوع التالي اذهب الى الأسفل 
كاتب الموضوعرسالة
Admin
Admin
avatar

عدد المساهمات : 736
تاريخ التسجيل : 16/07/2010
العمر : 36

مُساهمةموضوع: Background Codes   الأربعاء فبراير 01, 2012 6:22 pm


Background Codes

HTML Background Code
This page contains HTML background code. Feel free to copy and paste the HTML background code into your own website, blog, MySpace page, or other HTML document. And feel free to modify the code as you wish.

Also, please consider keeping the link back to this website - if you do it will be very much appreciated!

Shorthand Background Code
The quickest HTML code for backgrounds is the background property. Strictly speaking, this is a CSS property but you use it in conjunction with your HTML code. The background property is a shorthand property for setting all background properties at once.

Source Code
الكود:
<!-- Codes by HTMLcodes.me -->
<div style="background:#eee url(http://www.htmlcodes.me/images/backgrounds/background-image-2.gif) repeat fixed;
      overflow:scroll;
      width:200px;
      height:100px;">
<p>This example sets all the background properties with one property - the 'background' property. This keeps the code shorter and easier to read.</p>
</div>
<p><a  style="font-size:11px;color:#999;" href="http://ous8.withme.us/t680-topic/">HTML Text</a></p>

Result
This example sets all the background properties with one property - the 'background' property. This keeps the code shorter and easier to read.

Page Background
To set the background for the whole page, simply apply the background property against the body tag.

Example:

الكود:
<body style="background:#eee url(http://www.htmlcodes.me/images/backgrounds/background-image-2.gif) repeat fixed;">
...
</body>

Alternative Background Codes
Below are more HTML background codes. In these examples, instead of using the background shorthand property, we use a property more specific to the actual effect we want to achieve. Doing this is simply an alternative - it's your choice which method you use.

Background Color
This example code applies a background color to a p tag using the background-color property. You can apply background color to any other HTML element, such as a div tag, body tag etc. Here, we also apply color to the text by using the color property.

Choose a color with the HTML color picker

Source Code

الكود:
<!-- Codes by HTMLcodes.me -->
<p style="background-color:#0f0;color:black;width:200px;">This text has got a background color applied. You could also apply background color to the whole page if you like.</p>
<p><a  style="font-size:11px;color:#999;" href="http://ous8.withme.us/t680-topic/">HTML Text</a></p>

Result

This text has got a background color applied. You could also apply background color to the whole page if you like.

Background Image
This example code applies a background color to a p tag using the background-color property. You can apply background color to any HTML element, such as a div tag, body tag etc. Here, we also apply color to the text by using the color property.

Source Code

الكود:
<!-- Codes by HTMLcodes.me -->
<p style="background-color:#0f0;color:black;width:200px;">This text has got a background color applied. You could also apply background color to the whole page if you like.</p>
<p><a  style="font-size:11px;color:#999;" href="http://ous8.withme.us/t680-topic">HTML Text</a></p>

Result

This div tag has got a background image. You could also apply a background image to the whole page if you like.

Fixed Background Image
You can fix the background image so that it doesn't scroll when you scroll the div (or page, as the case may be).

Source Code

الكود:
<!-- Codes by HTMLcodes.me -->
<div style="background-image:url(http://www.htmlcodes.me/images/backgrounds/background-image-2.gif);
   background-repeat:repeat;
   background-attachment:fixed;
   overflow:scroll;
   width:200px;
   height:100px;">
<p>This HTML background code demonstrates how to keep the background image fixed. Scroll down to see what I mean - the background image stays in the same position.</p>
</div>
<p><a  style="font-size:11px;color:#999;" href="http://ous8.withme.us/t680-topic">HTML Text</a></p>

Result

This HTML background code demonstrates how to keep the background image fixed. Scroll down to see what I mean - the background image stays in the same position.




الرجوع الى أعلى الصفحة اذهب الى الأسفل
http://ous8.withme.us
 
Background Codes
استعرض الموضوع السابق استعرض الموضوع التالي الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» خلفيات لمصممين الفوتوشوب(Wedding Background)
» Madina Munawara, Roza-e-Rasool, Masjid Nabawi Wallpapers And Desktop Background

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
منتدى طلاب جامعة السودان المفتوحة :: منتدى لغات البرمجه :: منتدى HTML-
انتقل الى: