English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<frame> هو عنصر HTML يحدد منطقة معينة يمكن عرض وثيقة HTML أخرى فيها. يجب استخدام <frame> في <frameset>. لا يجب الترويج لاستخدام <frame> بسبب بعض العيوب مثل مشاكل الأداء، وكذلك نقص قابلية الوصول للمستخدمين الذين يستخدمون محولات الشاشة. يجب الترويج لـ <iframe> أكثر من <frame>.
A simple three-frame page:
<!DOCTYPE html> <html> <frameset cols="25%,*,25%"> <frame src="sun.html"> <frame src="venus.html"> <frame src="mercur.html"> </frameset> </html>Test to see
IEFirefoxOperaChromeSafari
All mainstream browsers support the <frame> tag.
HTML5 does not support the <frame> tag.
The <frame> tag defines the child windows (frames) within <frameset>.
Each <frame> within <frameset> can be set with different attributes, such as border, scrolling, noresize, etc.
Note:If you want to validate a page that contains frames, make sure <!DOCTYPE> Set to "HTML Frameset DTD" or "XHTML Frameset DTD".
HTML5 does not support the <frame> tag, HTML 4.01 supports the <frame> tag.
In HTML, the <frame> tag does not have a closing tag. In XHTML, the <frame> tag must be closed correctly.
الخصائص | القيمة | الوصف |
---|---|---|
frameborder | 0 1 | HTML5 does not support. Specifies whether a border is displayed around the frame. |
longdesc | URL | HTML5 does not support. Specifies a page that contains a long description of the content of the frame. |
marginheight | pixels | HTML5 does not support. Specifies the top and bottom margins of the frame. |
marginwidth | pixels | HTML5 does not support. Specifies the left and right margins of the frame. |
name | name | HTML5 does not support. Specifies the name of the frame. |
noresize | noresize | HTML5 does not support. Specifies that the size of the frame cannot be adjusted. |
scrolling | yes no auto | HTML5 does not support. Specifies whether a scrollbar is displayed in the frame. |
src | URL | HTML5 does not support. Specifies the URL of the document to be displayed in the frame. |
يدعم علامة <frame> في HTML 4.01 الميزات المعيارية التالية:
الخصائص | القيمة | الوصف |
---|---|---|
class | classname | تحديد اسم الفئة للمعلمات |
id | id | تحديد id الفريد للمعلمات |
style | style_definition | تحديد النمط الداخلي للمعلمات |
title | text | تحديد معلومات إضافية للمعلمات |
للحصول على وصف كامل، يرجى زيارةخصائص المعيار.
وفقاً لمواصفات W3C، في HTML 4.01، لا يدعم علامة <frame> أي خصائص أحداث.
لكن جميع المتصفحات تدعم الحدث onload.
للحصول على وصف كامل، يرجى زيارةخصائص الحدث.
الصندوق الأفقي
هذا المثال يوضح كيفية إعداد هيكل أفقي باستخدام ثلاثة مستندات مختلفة.
هيكل المزيج
هذا المثال يوضح كيفية إنشاء هيكل من ثلاثة مستندات، ودمجهم في الصف والعمود.
هيكل الصندوق يحتوي على خاصية noresize="noresize"
هذا المثال يوضح خاصية noresize. في هذا المثال، يمكن تغيير حجم الصندوق. إذا قمت بسحب فأرة فوق حواف الصندوق، ستجد أن الحواف غير قابلة للتحريك.