某些分辨率的网页布局中的线条

发布于 2024-12-04 09:23:08 字数 420 浏览 1 评论 0原文

我正在创建的布局有问题 - 问题是在某些分辨率下(或者如果放大)您可以看到 div 框的轮廓在哪里。

它应该是这样的: expected Behaviour

这是在某些分辨率(或放大)下的样子:

观察到的行为

如果您需要查看该网站,则为 这里,尽管显然它还没有完成。根据您的分辨率,您可能会立即看到问题,如果没有,您可以放大或更改显示器分辨率。

我想这是一个常见问题,有一个简单的解决方案。感谢您的帮助!

I have a problem with the layout I'm creating- problem being that in certain resolutions (or if you zoom in) you can see where the outlining of the div boxes are.

Here's what it's supposed to look like:
expected behaviour

Here's what it looks like at some resolutions (or zoomed in):

observed behaviour

If you need to see the website, it's here, though obviously it's not finished yet. You might immediately see the problem based on your resolution, if not you could zoom in or change your monitors resolution.

I would imagine this is a common problem with an easy solution. Thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那小子欠揍 2024-12-11 09:23:08

如果将 #righthand 更改为 float:left,右侧的垂直线就会消失。

#righthand {
    width: 368px;
    height: 373px;
    background: url("../img/right.png");
    float: right;  // CHANGE TO LEFT
}

如果将 #tp 更改为 height:248px,另一条水平线就会消失。

#tp {
    width: 1024px;
    height: 249px;  //CHANGE TO 248px
}

If you change your #righthand to have a float:left, the vertical line at the right disappears.

#righthand {
    width: 368px;
    height: 373px;
    background: url("../img/right.png");
    float: right;  // CHANGE TO LEFT
}

And if you change your #tp to height:248px, the other horizontal line disappears.

#tp {
    width: 1024px;
    height: 249px;  //CHANGE TO 248px
}
唔猫 2024-12-11 09:23:08

在网站被删除之前,我没有足够的时间查看该网站,但我认为它可以像设置

背景一样简单:透明 url(imgsrc) no-repeat left top;

css 中背景图像的简写将锁定该位置。除此之外,我会确保你有

margin: 0;
填充:0;

这样您就可以指定准确的宽度,并确保所进行的切割是针对网格进行的,以便在切片图像时获得准确的宽度。

I didn't have enough time to look at the site before it was taken down but I think it could be as simple as setting

background: transparent url(imgsrc) no-repeat left top;

that shorthand for the background image in css will lock in the spot. Other than that I would make sure you have

margin: 0;
padding: 0;

so that you can specify the exact width and make sure the cuts that are made are done to a grid so that when you slice the image you have an exact width.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文