我用360浏览器调试我的web程序为什么控件button被拉长

dylanliu9301 2012-06-07 08:03:07
我用360浏览器调试我的web程序为什么控件button被拉长了????但我用ie打开却正常。什么原因,求指教!
...全文
203 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
机器人 2012-06-08
  • 打赏
  • 举报
回复
浏览器兼容的问题,你如果用的是360极速浏览器,那么它的内核是Chrome和IE是不同的。

建议使用一些开源的js框架,比如dojo这样的,使用提供的控件,它已经帮你解决了兼容性问题。
E次奥 2012-06-08
  • 打赏
  • 举报
回复
看你button的margin和panding属性值。设置固定宽度!
孟子E章 2012-06-08
  • 打赏
  • 举报
回复
使用360安全浏览器5.0版看你的代码没有被拉长啊

为了防止拉长,你可以定义width属性
dylanliu9301 2012-06-08
  • 打赏
  • 举报
回复
设置固定width没问题了,是兼容导致的结果么?
dylanliu9301 2012-06-08
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 的回复:]

不贴代码谁知道你怎么写的啊?

如果新建一个页面只有
<input type="button">也被拉长了,那就是浏览器的问题。
[/Quote]
按1楼说法,我新建一页面果然被拉长了,只是为什么有的窗体button控件会被拉长,有的不会?
dylanliu9301 2012-06-08
  • 打赏
  • 举报
回复
虽然有的窗体Button被拉长了,但有的窗体Button同样用360打开却正常,怎么回事
ITIBB-Shrek 2012-06-07
  • 打赏
  • 举报
回复
不同的浏览器对样式的兼容性是不一样的,即使是IE的不同版本,也会出现各种样式的问题,所以一般公司在处理不同浏览器访问的情况下,要判断浏览器的类型,然后再加载对应的CSS样式
dylanliu9301 2012-06-07
  • 打赏
  • 举报
回复
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
#form1
{
height: 730px;
}
.style1
{
z-index: 1;
left: 675px;
top: 300px;
position: absolute;
height: 21px;
}
.style2
{
z-index: 1;
left: 225px;
top: 490px;
position: absolute;
height: 175px;
width: 565px;
}
</style>
</head>
<body style="height: 640px">
<form id="form1" runat="server" clientidmode="Inherit">
<div>
</div>
<asp:Label ID="Label1" runat="server"
style="z-index: 1; left: 50px; top: 225px; position: absolute"
Text="Generate a customer affinity report for top 100 customers"></asp:Label>
<asp:Label ID="Label2" runat="server"
style="z-index: 1; left: 55px; top: 290px; position: absolute"
Text="Generate a total revenue report from the month"></asp:Label>
<asp:Label ID="Label3" runat="server"
style="z-index: 1; left: 55px; top: 95px; position: absolute; height: 15px"
Text="Select a report:" Font-Bold="True" Font-Size="15pt"></asp:Label>
<asp:Label ID="Label4" runat="server"
style="z-index: 1; left: 50px; top: 160px; position: absolute; height: 16px"

Text="Generate a flight usage report for all flights supplied by the airline"></asp:Label>
<asp:DataGrid ID="DataGrid1" runat="server" CssClass="style2">
</asp:DataGrid>

<asp:ListBox ID="lstMonth" runat="server"
style="z-index: 1; left: 145px; top: 355px; position: absolute">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
</asp:ListBox>
<asp:ListBox ID="lstYear" runat="server"
style="z-index: 1; left: 295px; top: 355px; position: absolute">
<asp:ListItem>2002</asp:ListItem>
<asp:ListItem>2003</asp:ListItem>
<asp:ListItem>2004</asp:ListItem>
<asp:ListItem>2005</asp:ListItem>
</asp:ListBox>
<asp:Button ID="Button1" runat="server"
style="z-index: 1; left: 675px; top: 165px; position: absolute; height: 21px;"
Text="Generate" onclick="Button1_Click" />
<asp:Button ID="Button2" runat="server"
Text="Generate" CssClass="style1" onclick="Button2_Click" />
<asp:Button ID="Button3" runat="server"
style="z-index: 1; left: 675px; top: 230px; position: absolute"
Text="Generate" onclick="Button3_Click" />


</form>
</body>
</html>
孟子E章 2012-06-07
  • 打赏
  • 举报
回复
不贴代码谁知道你怎么写的啊?

如果新建一个页面只有
<input type="button">也被拉长了,那就是浏览器的问题。

dylanliu9301 2012-06-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

css样式的问题吧。默认情况下不是这样的
[/Quote]
为什么?
dylanliu9301 2012-06-07
  • 打赏
  • 举报
回复
为什么?怎么解决?
孟子E章 2012-06-07
  • 打赏
  • 举报
回复
css样式的问题吧。默认情况下不是这样的

62,267

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧