<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>dz21</title> <style type="text/css"> .box{ width: 800px; height: 650px; background-color: orangered; border-radius: 10% 10% 0 0; margin: 0 auto;<!--设置居中--> line-height: 1px; } .00{ width: auto; height: 80px; } #p1{ color: white; font-size: 50px; text-align: center; padding: 10px; } .line_01{ height: 1px; width: auto; background-color: white; } .01{ width: 100%; height: 570px; } .anjian{ font-size: 25px; } .radio{ width: auto; height: 50px; } #radio1{ margin-top: 20px; margin-left: 150px; } .text{ width: 48%; height: auto; float: left; margin-top: 40px; margin-left: 20px; } #text01{ font-size: 25px; } #text02{ font-size: 25px; } #text03{ font-size: 25px; } .img{ width: 45%; height: auto; float: right; text-align: center; margin-top: 40px; margin-right: 20px; } .anniu{ width: auto; height: 85px; margin-top: 350px; margin-left: 100px; } </style> </head> <body> <div class="box"> <div class="00"> <div id="p1">简单计算器</div> <div class="line_01"></div> </div> <div class="01"> <div class="anjian"> <input type="radio" id="radio1" name="gender" value="1" style="zoom: 200%;" />加法 <input type="radio" id="radio2" name="gender" value="2" style="zoom: 200%;"/>减法 </div> <div class="text"> <div id="text01"> 数1:<input type="text" id="text_1" placeholder="请输入第一个数字" style="width: 300px; height: 30px; font-size: 25px;"/> <p></p> </div> <div id="text02"> 数2:<input type="text" id="text_2" placeholder="请输入第二个数字" style="width: 300px; height: 30px;font-size: 25px;" /> <p></p> </div> <div id="text03"> 对比:<input type="text" id="text_3" placeholder="等于的数" style="width: 300px; height: 30px;font-size: 25px;"/> </div> </div> <div class="img"> <img src="img/21/right.jpg" width="200px" /> </div> <div class="anniu"> <input type="button" value="计算" style="width: 130px; height: 80px; font-size: 50px;" onclick="buttonClick(a,b,c)"/> <input type="button" value="交换" style="width: 130px; height: 80px; font-size: 50px;" onclick="changeClick(a,b)" /> <input type="button" value="换背景色" style="width: 250px; height: 80px; font-size: 50px;" onclick="background"/> </div> </div> </div> </body></html>