gpt4 book ai didi

html - 没有间隙的并排图像?

转载 作者:行者123 更新时间:2023-11-28 18:31:38 24 4
gpt4 key购买 nike

This is what i need help with, any ideas?

http://i.stack.imgur.com/o2Kht.png

基本上我希望这些按钮并排放置。

我已将它们放入容器中,但无法像下面的示例那样将它们并排放置。

 <head>
<link rel="stylesheet" type="text/css" href="mystyle.css"> <!-- Linking Style Sheets -->
</head>

<body>

<style type="text/css">


<!-- Background image -->


</style>

<div class="img-wrapper-center" id="titlebar">
<img src="titlebar.png" id="img1"/>
</div>
</div>

<div id="bodycontainer">
<div id="text">
Welcome to the shop, you can add your items to to the cart below
</div>

<div id="formcontainer">
<div id="myForm">
<form name="theForm" action="shop.html" method="post" onSubmit="return checkWholeForm(theForm)">
<input type="radio" name="ram" value="yes">yes<br>
<input type="radio" name="ram" value="no">no

<br><br>
<input type="radio" name="cpu" value="yes">yes<br>
<input type="radio" name="cpu" value="no">no

<br><br>
<input type="radio" name="harddrive" value="yes">yes<br>
<input type="radio" name="harddrive" value="no">no

<br><br>

</div>

<div id="submitbuttons">
<input type="submit" value="Submit">
<input type="reset">
</div>
</div>

</form>


<div id="buttoncontainer">

<div class="homebtn">
<a href="..\home.html" onmouseover="SwapOut()" onmouseout="SwapBack()"><img name="homebtn" src="homebuttonup.png"/>
</a>
<div class="shopbtn">
<a href="shop.html" onmouseover="SwapOutshop()" onmouseout="SwapBackshop()"><img name="shopbtn" src="shopbuttonup.png"/>
</a>
</div>
</div>

</body>





<!-- Start of rollover script -->

<script>
Rollimage = new Array()

Rollimage[0]= new Image(121,153)
Rollimage[0].src = "homebuttonup.png"

Rollimage[1] = new Image(121,153)
Rollimage[1].src = "homebutton.png"

function SwapOut() {
document.homebtn.src = Rollimage[1].src;
return true;
}

function SwapBack() {
document.homebtn.src = Rollimage[0].src;
return true;
}


Rollimageshop = new Array()

Rollimageshop[0]= new Image(121,153)
Rollimageshop[0].src = "shopbuttonup.png"

Rollimageshop[1] = new Image(121,153)
Rollimageshop[1].src = "shopbutton.png"

function SwapOutshop() {
document.shopbtn.src = Rollimageshop[1].src;
return true;
}

function SwapBackshop() {
document.shopbtn.src = Rollimageshop[0].src;
return true;
}


</script>
<!-- end of rollover script -->

<!-- Start of form validation -->

<script>

function checkWholeForm(theForm) {
var reason = '';
reason += checkRadioButtons(theForm.ram);

if (reason != '') {
alert(reason);
return false;
}
return true;
}


function checkRadioButtons(radiobuttons) {
var checkvalue = "";
var i=0;
var error = "";
var amountOfRadioButtons = radiobuttons.length;
for (i=0; i<amountOfRadioButtons; i++) {
if (radiobuttons[i].checked) {
checkvalue = theForm.ram[i].value;
}
}
if (!(checkvalue)) {
error = "Please choose an option for RAM.\n"
}
return error;
}





</script>

<!-- End of form validation -->

抱歉耽搁了,rofl 我是新手,所以我不知道如何识别它。

最佳答案

.homebtn, .shopbtn{
display:inline; /*or inline-block*/
}

关于html - 没有间隙的并排图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14106446/

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