CSS Adobe Muse:如何将主体设置为 100% 宽度?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17478661/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 23:24:47  来源:igfitidea点击:

Adobe Muse: How to style body to 100% width?

cssmuse

提问by Filip Petrovic

I've looked all over google and to be honest there aren't that many articles to answer a question as specific as this one , and i've tried going through the interface. So when you make a new page , you have a body , and by default , that body has some margin's between it and the browser window , now i've managed to take care of the top and bottom one so there's no padding on the browser window ( a.k.a. margin's on the body ) but there's still space between the browser and the body on the left and the right side.

我已经在谷歌上找遍了,老实说,没有那么多文章来回答像这个问题这样具体的问题,我试过浏览界面。所以当你创建一个新页面时,你有一个主体,默认情况下,主体在它和浏览器窗口之间有一些边距,现在我已经设法处理顶部和底部的,所以浏览器上没有填充窗口(也就是身体上的边距),但浏览器和身体左侧和右侧之间仍然有空间。

So how can i make my body's width be 100% of the browser's window because there's no width setting for the body , but only the page ( the browser window area).

那么我怎样才能让我的 body 的宽度成为浏览器窗口的 100%,因为 body 没有宽度设置,而只有页面(浏览器窗口区域)。

回答by Ricardo Marimon

body {
  margin: 0;
  padding: 0;
}

回答by Wild n' Young

Okay here is the best I can do...

好的,这是我能做的最好的...

Aside from going to Page > Page properties > metadata and adding your own css file. what you can do is go to the rectangle tool and expand it to whatever height you want, however you MUST make sure that you expand the width to the edges of the web canvas past the body border until the tooltip displays 100%. afterwards embed whatever you want in there. but bewarned, the more complex the object the more custom coding you need to add.

除了转到页面 > 页面属性 > 元数据并添加您自己的 css 文件。您可以做的是转到矩形工具并将其扩展到您想要的任何高度,但是您必须确保将宽度扩展到 web 画布的边缘,超过身体边框,直到工具提示显示 100%。然后在那里嵌入任何你想要的东西。但请注意,对象越复杂,您需要添加的自定义编码就越多。

Hope this helps

希望这可以帮助

回答by Rav Norodom

There is a way to make an object 100% the width of a browser. It's not so obvious and it's hidden:

有一种方法可以使对象 100% 为浏览器的宽度。它不是那么明显,它是隐藏的:

  1. Draw a rectangular box and fill the box with photo (scale to fit), set color to none.
  2. Resize the rectangular box to the same width of the canvas (page size).
  1. 画一个矩形框并用照片填充框(缩放以适合),将颜色设置为无。
  2. 将矩形框的大小调整为与画布相同的宽度(页面大小)。

The combination of the procedures above activates 100% width on the object.

上述过程的组合在对象上激活 100% 宽度。

回答by Modz Marvin

Be sure you are using "browser fill" and not just "fill". The fill one will fill in a box in the center.... Browser fill will literally fill the whole page. Got stuck on this for ages!

确保您使用的是“浏览器填充”,而不仅仅是“填充”。填充将填充中心的一个框.... 浏览器填充将字面上填充整个页面。多年来一直坚持这个!

回答by Amanda

There is a simple one-click solution for 100% width, which I just came across in this awesome article after having trouble getting my footer to go all the way across on wide screen laptops...

有一个简单的一键式 100% 宽度解决方案,我刚刚在这篇很棒的文章中遇到了这个问题,因为我在宽屏笔记本电脑上无法让我的页脚一直显示...

In your top toolbar between the X/Y and W/H inuts, there is a little box with an arrow that points either way. Hover over it and you will see that it says '100%'.

在 X/Y 和 W/H 输入项之间的顶部工具栏中,有一个带有指向任一方向的箭头的小框。将鼠标悬停在它上面,您会看到它显示“100%”。

click it and you're done!!! :-)

点击它,你就完成了!!!:-)

http://www.designeasy.co/2014/07/5-very-cool-tips-for-adobe-muse-cc-2014.html

http://www.designeasy.co/2014/07/5-very-cool-tips-for-adobe-muse-cc-2014.html

回答by Muhammad Qasim

Open your page in adobe muse Go to "Page properties" select "Metadata" From Page properties and add the following code to HTML for <head>area:

在 adobe muse 中打开您的页面转到“页面属性”,从页面属性中选择“元数据”,然后将以下代码添加到<head>区域的HTML 中:

<style>
body {
    overflow-x:hidden;
}
</style>

回答by T double

insert the following code into your header tags as follows (Where theme.css is the name of your css.)Now, go to you css and enter the css given to you by user255

将以下代码插入到您的标题标签中,如下所示(其中 theme.css 是您的 css 的名称。)现在,转到您的 css 并输入 user255 给您的 css