多少px等于100%宽度? [英] how many px equal to 100% width?

查看:137
本文介绍了多少px等于100%宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




如果我将我的身体元素宽度设置为100%,多少px值等于

这个100%宽度?

< html>

....

< body>

....

< / body>

< / html>


在上面的html代码中,我原来的CSS是

body {width:100%;}


如果我想让我的CSS使用px单元,X是什么以下

代码中的值与使用宽度的结果相同:100%?

body {width:Xpx;}

Hi,

if I set my body element width to be 100%, how many px value equal to
this 100% width?
In other words,

<html>
....
<body>
....
</body>
</html>

In above html codes, my original CSS is
body {width: 100%;}

if I want my CSS use px unit, what is the X value in the following
code to have the same result as the one using width:100%?
body {width: Xpx;}

推荐答案

" mao" < kc ********** @ gmail.com写信息

新闻:a4 ******************** ************** @ i29g2000 prf.googlegroups.com ...
"mao" <kc**********@gmail.comwrote in message
news:a4**********************************@i29g2000 prf.googlegroups.com...




如果我将我的身体元素宽度设置为100%,多少px值等于

这个100%宽度?

换句话说,


< html>

...

< body>

...

< / body>

< / html>


在上面的html代码中,我原来的CSS是

body {width:100%;}


如果我想让我的CSS使用px单位,以下

代码中的X值是多少与使用宽度的结果相同:100%?

body {width:Xpx;}
Hi,

if I set my body element width to be 100%, how many px value equal to
this 100% width?
In other words,

<html>
...
<body>
...
</body>
</html>

In above html codes, my original CSS is
body {width: 100%;}

if I want my CSS use px unit, what is the X value in the following
code to have the same result as the one using width:100%?
body {width: Xpx;}



没有1:1的比率用于从%转换为px。这取决于浏览器的

视口大小。对于不同的人来说不同,

取决于他们的屏幕分辨率,他们的浏览器是否最大化或者不是b
,浏览器中有多少镀铬/工具栏等等一整套

其他一些东西。

There is no 1:1 ratio for converting from % to px. It depends on the
viewport size of your browser. It is different for different people,
depending on their screen resolution, whether their browser is maximised or
not, how much chrome/toolbars etc. there are in the browser and a whole
bunch of other things.


Nik Coughlin写道:
Nik Coughlin wrote:

" mao" < kc ********** @ gmail.com写信息

新闻:a4 ******************** ************** @ i29g2000 prf.googlegroups.com ...
"mao" <kc**********@gmail.comwrote in message
news:a4**********************************@i29g2000 prf.googlegroups.com...



< snip>

<snip>


>如果我想让我的CSS使用px单位,以下
代码中的X值与该结果具有相同的结果使用宽度:100%?
body {width:Xpx;}
>if I want my CSS use px unit, what is the X value in the following
code to have the same result as the one using width:100%?
body {width: Xpx;}



从%转换为px没有1:1的比例。这取决于浏览器的

视口大小。对于不同的人来说不同,

取决于他们的屏幕分辨率,浏览器是否最大化

,浏览器中有多少镀铬/工具栏等等a

其他一大堆东西。


There is no 1:1 ratio for converting from % to px. It depends on the
viewport size of your browser. It is different for different people,
depending on their screen resolution, whether their browser is maximised
or not, how much chrome/toolbars etc. there are in the browser and a
whole bunch of other things.



同意。这是一个有多少天使可以在针头上跳舞?类型

问题。因此,Jukka会直截了当地说,停止想要那样。


-

小心,


Jonathan

-------------------

LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


文章

< a4 ********************************** @ i29g2000prf。 googlegroups.co

m>,

mao< kc ********** @ gmail.comwrote:
In article
<a4**********************************@i29g2000prf. googlegroups.co
m>,
mao <kc**********@gmail.comwrote:




如果我将我的身体元素宽度设置为100%,多少px值等于

这100%宽度?

换句话说,


< html>

...

< ;机构>

...

< / body>

< / html>


在上面的html代码中,我原来的CSS是

body {width:100%;}


如果我想让我的CSS使用px单元,那是什么以下

代码中的X值与使用宽度的结果相同:100%?

body {width:Xpx;}
Hi,

if I set my body element width to be 100%, how many px value equal to
this 100% width?
In other words,

<html>
...
<body>
...
</body>
</html>

In above html codes, my original CSS is
body {width: 100%;}

if I want my CSS use px unit, what is the X value in the following
code to have the same result as the one using width:100%?
body {width: Xpx;}



如果你没有在身上放一个宽度,或者如果你不必要的话,

的宽度为100%,如果身体有背景颜色

的红色,红色将拉伸到浏览器窗口的宽度。没有

窗户有多宽。


但是当你在一个屏幕上更改窗口大小时,你必须改变
红色像素的数量。像素是固定大小的

,取决于屏幕的性质。浏览器

窗口是可变的,并且包含与你b
一样多的像素。


因此没有px在这个问题上相当于%。


-

dorayme


If you do not put in a width on body or if you, unnecessarily,
put in a width of 100%, and if the body has a background colour
of red, the red will stretch as wide as the browser window. No
matter how wide the window.

But as you change the window size on even one screen, you
necessarily change the amount of red pixels. The pixels are a
fixed size and depend on the nature of the screen. The browser
window is variable and covers as many or as few pixels as you
have got.

Thus there is no px equivalence to a % in this matter.

--
dorayme


这篇关于多少px等于100%宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆