使用Button时,有时button上方顶部会出现多余的颜色线条

博客提到将内容改为TextView,这可能与前端开发中界面元素的设置相关。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

改为TextView就可以啦

<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>三维管理平台</title> <script type="text/javascript"> while (true) { try { var w = 400, h = 300; window.resizeTo(w, h); window.moveTo((window.screen.width - w) / 2, (window.screen.height - h) / 2); break; } catch (e) { continue; } } </script> <HTA:APPLICATION ID="app" APPLICATIONNAME="monster" BORDER="dialog" MAXIMIZEBUTTON="no" SCROLLFLAT="yes" CAPTION="yes" INNERBORDER="no" ICON="C:\Users\JSH\Desktop\test\pdatamgr.ico" SCROLL="no" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" WINDOWSTATE="normal" /> <style> body { width: 320px; height: 180px; margin: 0; padding: 0; background-color: #ffffff; font-family: "Microsoft YaHei", sans-serif; position: relative; } .container { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-around; align-items: center; padding: 0; /* 移除垂直padding */ } .message { font-size: 25px; color: #333; margin: 0; /* 移除外边距 */ text-align: center; padding: 0 55px; position: absolute; /* 绝对定位 */ top: 30%; /* 垂直居中 */ transform: translateY(-30%); /* 精确校正位置 */ } .buttons { display: flex; width: 100%; justify-content: center; } button { width: 90px; height: 40px; background-color: #f0f0f0; color: white; border: none; border-radius: 8px; /* 较大的圆角值 */ font-size: 25px; cursor: pointer; transition: background-color 0.2s; margin: 0 25px; } button:hover { background-color: #005a9e; } .left-btn { position: absolute; left: 10px; bottom: 40px; } .right-btn { position: absolute; right: 10px; bottom: 40px; } </style> </head> <body> <div class="container"> <div class="message">请选择打开模型的方式</div> <div> <button onclick="selectOption('打开')" class="left-btn">打开</button> <button onclick="selectOption('插入')" class="right-btn">插入</button> </div> </div> </body> </html> 帮我修改这个代码 在按钮上加一条线 然后修改按钮所在区域的背景色为灰色 不要动按钮位置 不要动现有布局 不要动按钮位置
最新发布
08-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值