gpt4 book ai didi

html - 设置图像内联优先

转载 作者:太空宇宙 更新时间:2023-11-03 19:06:14 24 4
gpt4 key购买 nike

如何在没有
的情况下内联设置图像“LeftSpacer”和“RightSpacer”,但仍留在页面“Wrapper”中我需要“LeftSpacer”,如果它是,“RightSpace”与“LeftSpacer”内联"但一直向右。

<html> 
<head>

<style type="text/css">
<!--
body {
text-align:center; /* for IE */
margin:0 auto; /* for the rest */
background-color: #ffffff;
}

#Wrapper{
width: 1000px;
}

div#wrapper {
text-align:left;
width:1000px; /* or a percentage, or whatever */
}

/*End Page Wrapper*/

#Header {
width: 100%;
height: 100%;
background: url("http://www.web-designer-ga.com/Pics/top.gif") no-repeat 0 0;
}

#LeftSpacer {
width: 14px;
height: 24px;
background: url("http://www.web-designer-ga.com/Pics/btn_lft.gif") no-repeat 0 0;
}

#RightSpacer {
width: 100%;
height: 100%;
background: url("http://www.web-designer-ga.com/Pics/btn_rgt.gif") no-repeat 0 0;
}

-->
</style>

</head>

<body>

<div id="Wrapper">

<div id="Header"></div>

<div id="LeftSpacer"></div>

<div id="RightSpacer"></div>

</div>

</body>
</html>

最佳答案

你可以给 Leftspacer 和 Rightspacer 一个公共(public)类,比如:class="spacers" 然后将 css 值设置为 float:rightdisplay:内联

关于html - 设置图像内联优先,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10155191/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com