如何为主页添加全局框架集背景图像

How to add a globally frameset backgound image for a main page?

本文关键字:框架 背景 图像 全局 添加 主页      更新时间:2023-09-26

我想为我的Jsp页面添加一个背景页面,在这种情况下,当我使用背景图像作为主框架集时,我使用了一个框架集,它在FF和IE中显示问题,代码是:

<frameset cols="*,1020px,*" border="0" class="bg" style="images/background.jpg">
    <frame src="about:blank"  /> 
        <!-- Next frameset is centered horizontally and have width:1020px --> 
        <!-- Tested in IE8,Chrome13,Opera11.50,Safari5,FF7 --> 
        <frameset rows="8%,*" border="0"  >  
            <frame src="HeaderUi.jsp" name="header" scrolling="no" style="border-bottom:5px solid #630000;" /> 
                <frameset cols="220px,540px,*" border="0" style="background:#000">  
                    <frame src="webSearchUi" name="search" />   
                <frameset rows="65%,*" border="0" >       
                    <frame src="webMainPageUi" name="mainPage" scrolling="yes" style="border:1px dotted #7D7D7D; border-top:0px; border-bottom:0px dashed #5c5c5c" />        <frame src="webEventPanelUi" name="eventPanel" style="border:1px dotted #7D7D7D; border-top:1px solid #7D7D7D; border-bottom:0px dashed #5c5c5c" />      </frameset>   
                    <frame src="webDataPanelUi" name="dataPanel" style="border-style:solid;border-width:0pt;border-color:66CC33">
                </frameset>
                    <frame src="about:blank" class="Bg" />   
                </frameset> 
        </frameset>  
<frame src="about:blank" /> </frameset> 

在这段代码中,我想使用背景图像。提前感谢Mayur伴侣

如果你打算使用属性style,你应该按照以下方式编写css样式:

风格= " property1: value1;property2: value2 "

在你的例子中,代码应该是:

<frameset cols="*,1020px,*" border="0" class="bg" style="background: url('images/background.jpg');">