简体   繁体   English

如何使横幅部分中的横幅和图像响应不同的屏幕尺寸(例如平板电脑)

[英]How to make banner and image in banner section responsive to different screen sizes (e.g. tablet)

Site URL: deleted站点 URL:已删除

Hi there,你好呀,

how can I make my landing page on Squarespace responsive to different screen sizes by CSS?如何通过 CSS 使 Squarespace 上的登录页面响应不同的屏幕尺寸? It is quite fine for mobile view, desktop and big screens.它非常适合移动视图、桌面和大屏幕。 But it does not look good in between desktop and mobile view.但它在桌面和移动视图之间看起来并不好。 the Logo gets too big or the banner is not full width so it is cut off on the right side (see screen shots).徽标太大或横幅未全宽,因此在右侧被切断(见屏幕截图)。 标志图片太大 横幅被切断/不是全宽

Does anyone know what code I need to show the banner in full width and to avoid the logo (image) in the banner section getting too big on certain screen size?有谁知道我需要什么代码来全宽显示横幅并避免横幅部分中的徽标(图像)在某些屏幕尺寸上变得太大?

Thank you for helping!感谢您的帮助!

The options you have to remedy this are:您必须解决的选项是:

  1. Remove the numbers/text on the right from the image and upload a new image without the numbers/text.从图像中删除右侧的数字/文本并上传没有数字/文本的新图像。 The, add the numbers/text via a code block and use CSS to absolutely position it within the section, anchoring it to the right-hand side.然后,通过代码块添加数字/文本并使用 CSS 绝对 position 它在部分内,将其锚定到右侧。

  2. Set the anchor point of the image all the way to the right.将图像的锚点一直设置到右侧。 This will keep the numbers/text in view at all times and avoid cutting it off.这将始终保持数字/文本可见,并避免将其切断。 However, that means the buildings will often not be in view, and I assume the buildings are the focal point, so perhaps this is not a good option.然而,这意味着建筑物通常不会出现在视野中,而且我认为建筑物是焦点,所以这可能不是一个好的选择。

  3. Redo the graphic a bit so that the numbers/text on the right are further to the left, floating more to the middle, avoiding being cropped on most devices before the switch to mobile occurs and the section is hidden in favor of the mobile-specific section.稍微重做一下图形,使右侧的数字/文本更靠左,更多地浮动到中间,避免在切换到移动设备之前在大多数设备上被裁剪,并且该部分被隐藏以支持特定于移动设备部分。

  4. Use CSS to override the focal point entirely and force the image to be anchored to the right-hand side, like this:使用 CSS 完全覆盖焦点并强制图像锚定到右侧,如下所示:

     [data-section-id="5fc3e08408845d092400c576"].section-background img { object-position: 100% 50%;important; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM