如何在FRAMESET中的特定FRAME中选择BODY标记 [英] How do I select the BODY tag in a specific FRAME in a FRAMESET

查看:112
本文介绍了如何在FRAMESET中的特定FRAME中选择BODY标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法编写一个CSS选择器来指向

特定框架中的body标签?


框架集HTML看起来像这样。我只想在名为navbar的框架中选择BODY标签

。然后将样式应用于该元素。


< HTML>

< HEAD>

< META HTTP-EQUIV = QUOT;内容类型" CONTENT =" text / html;

CHARSET = iso-8859-1">

< TITLE> My Frameset< / TITLE>

< / HEAD>

< FRAMESET framespacing =" 3" cols =" 190,*">

< FRAME bordercolor ="#3D5FA3"名称= QUOT;导航栏" title =" Navigation"

src =" navbar.html" MARGINHEIGHT =" 0" MARGINWIDTH =" 0" scrolling =" auto"

border =" 1">

< FRAME name =" viewer"标题= QUOT;内容" src =" centents.html"

scrolling =" auto">

< NOFRAMES>

< BODY>

< P>此页面使用框架,但您的浏览器不支持框架。< / P>

< / BODY>

< / NOFRAMES>


< / FRAMESET>

< / HTML>


谢谢,

Blake

解决方案

Blake West写道:

有没有办法写一个CSS选择器指向特定框架中的正文
标签?

框架集HTML看起来像这样。我只想在名为navbar的框架中选择
BODY标签。然后将
样式应用于该元素。

< HTML>
< HEAD>
< META HTTP-EQUIV =" Content-Type" CONTENT =" text / html;
CHARSET = iso-8859-1">
< TITLE> My Frameset< / TITLE>
< / HEAD>
< ; FRAMESET framespacing =" 3" cols =" 190,*">
< FRAME bordercolor ="#3D5FA3" name =" navbar"
title =" Navigation" SRC =" navbar.html" marginheight =" 0"
marginwidth =" 0"滚动= QUOT;汽车" border =" 1">
< FRAME name =" viewer"标题= QUOT;内容" src =" centents.html"
scrolling =" auto">
< NOFRAMES>
< BODY>
< P>此页面使用框架,但是你的浏览器不支持
他们。< / P> < / BODY>
< / NOFRAMES>

< / FRAMESET>
< / HTML>

谢谢,
Blake




在navbar.html中你有< body>,那就是你应用

样式的地方。我在想你使用一个单独的样式表,所以你要
必须在那个< body>中添加一个类。元件。就像你一样

会对任何其他元素。


哦,顺便说一句,你可以尝试丢失帧。

我听说他们是邪恶的:-)

http://www.google.com/search?q="frames+are+evil"


-

Els http://locusmeus.com/

Sonhos vem。 Sonhos v?o。 Orestoébritfeito。

- Renato Russo -

正在播放:A-HA - 狩猎高低




" Blake West" < BL ******* @ gmail.com>在消息中写道

news:b2 ************************* @ posting.google.co m ... < blockquote class =post_quotes>有没有办法编写一个CSS选择器来指向
特定框架中的body标签?

框架集HTML看起来像这样。我只想在名为navbar的框架中选择BODY标签
。然后将样式应用于该元素。




框架集文档中定义的样式仅适用于

NOFRAMES元素内的内容。每个框架中文档的外观由文档中定义的样式管理




2004年10月27日18 :35:27 GMT,Els< el ********* @ tiscali.nl>写道:

Blake West写道:

有没有办法编写一个CSS选择器来指向
特定框架?



样式表仅适用于包含它们的文档。添加LINK

(或STYLE,如果必须)元素到该框架中的文件,样式为




身体{

/ * ... * /

}


[snip]
$ b $噢,顺便说一句,你可以尝试丢失框架。
我听说他们是邪恶的:-)
http://www.google.com/search?q="帧+是+邪恶的"




尝试:


< URL:http://www.google.com/搜索?q =%22frames +是+邪恶%22>


:)


迈克


-

Michael Winter

替换.invalid与.uk通过电子邮件回复。


Is there a way to write a CSS selector to point to the body tag in a
specific frame?

The frameset HTML looks like this. I only want to select the BODY tag
in the frame named "navbar" and then apply styles to that element.

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
CHARSET=iso-8859-1">
<TITLE>My Frameset</TITLE>
</HEAD>
<FRAMESET framespacing="3" cols="190,*">
<FRAME bordercolor="#3D5FA3" name="navbar" title="Navigation"
src="navbar.html" marginheight="0" marginwidth="0" scrolling="auto"
border="1">
<FRAME name="viewer" title="Contents" src="centents.html"
scrolling="auto">
<NOFRAMES>
<BODY>
<P>This page uses frames, but your browser doesn''t support them.</P>
</BODY>
</NOFRAMES>

</FRAMESET>
</HTML>

Thanks,
Blake

解决方案

Blake West wrote:

Is there a way to write a CSS selector to point to the body
tag in a specific frame?

The frameset HTML looks like this. I only want to select
the BODY tag in the frame named "navbar" and then apply
styles to that element.

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
CHARSET=iso-8859-1">
<TITLE>My Frameset</TITLE>
</HEAD>
<FRAMESET framespacing="3" cols="190,*">
<FRAME bordercolor="#3D5FA3" name="navbar"
title="Navigation" src="navbar.html" marginheight="0"
marginwidth="0" scrolling="auto" border="1">
<FRAME name="viewer" title="Contents" src="centents.html"
scrolling="auto">
<NOFRAMES>
<BODY>
<P>This page uses frames, but your browser doesn''t support
them.</P> </BODY>
</NOFRAMES>

</FRAMESET>
</HTML>

Thanks,
Blake



In navbar.html you have <body>, and that''s where you apply the
styles. I''m imagining you use a seperate stylesheet, so you''d
have to add a class to that <body> element. Just like you
would to any other element.

Oh, and btw, you could try losing the frames.
I''ve heard they''re evil :-)
http://www.google.com/search?q="frames+are+evil"

--
Els http://locusmeus.com/
Sonhos vem. Sonhos v?o. O resto é imperfeito.
- Renato Russo -
Now playing: A-HA - Hunting High And Low



"Blake West" <bl*******@gmail.com> wrote in message
news:b2*************************@posting.google.co m...

Is there a way to write a CSS selector to point to the body tag in a
specific frame?

The frameset HTML looks like this. I only want to select the BODY tag
in the frame named "navbar" and then apply styles to that element.



Styles defined in a frameset document only apply to content inside the
NOFRAMES element. The appearance of the document in each frame is governed
by the styles defined in the document.


On 27 Oct 2004 18:35:27 GMT, Els <el*********@tiscali.nl> wrote:

Blake West wrote:

Is there a way to write a CSS selector to point to the body tag in a
specific frame?


Stylesheets only apply to the document that contains them. Add the LINK
(or STYLE, if you must) element to the file in that frame, and style as
required.

body {
/* ... */
}

[snip]
Oh, and btw, you could try losing the frames.
I''ve heard they''re evil :-)
http://www.google.com/search?q="frames+are+evil"



Try:

<URL:http://www.google.com/search?q=%22frames+are+evil%22>

:)

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


这篇关于如何在FRAMESET中的特定FRAME中选择BODY标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆