MIN()/ MAX() [英] Min()/max()

查看:75
本文介绍了MIN()/ MAX()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!


为什么CSS不支持min()/ max()这样的原始函数?像


blah

{

宽度:最大(50px,20%); // 20%&但不低于50px

}


通常会很有用..


Timo

Hi!

Why doesn''t CSS support primitive functions like min()/max()? Something like

blah
{
width: max(50px,20%); // 20%& but not less than 50px
}

would really often be useful..

Timo

推荐答案

Timo Nentwig< tc*@spamgourmet.org>写道:
Timo Nentwig <tc*@spamgourmet.org> wrote:
为什么CSS不支持像min()/ max()这样的原始函数?类似于


因为CSS不是一种编程语言,因此根本不包含

任何函数?

blah
{
宽度:最大(50px,20%); // 20%&但不低于50px
}


听起来像,

blah {

max-width:20%;

最小宽度:50px;

}

通常很有用..
Why doesn''t CSS support primitive functions like min()/max()? Something like
Because CSS is not a programming language and therefor doesn''t contain
any functions at all?
blah
{
width: max(50px,20%); // 20%& but not less than 50px
}
Sounds like,
blah {
max-width: 20%;
min-width: 50px;
}
would really often be useful..




告诉微软,也许他们将来会在某些

点支持最小宽度和最大宽度。毕竟现在只有六年了,CSS2发布了




史蒂夫


-

我的理论给你起见,我的异端邪说你愤怒,

我从不回信,你不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>



Tell Microsoft, maybe they''ll support min-width and max-width at some
point in the future. After all it''s only six years since CSS2 was
published.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


Timo Nentwig< tc*@spamgourmet.org>写道:
Timo Nentwig <tc*@spamgourmet.org> wrote:
为什么CSS不支持像min()/ max()这样的原始函数?

blah {
width:max( 50像素,20%); // 20%&但不低于50px
}

通常会很有用..
Why doesn''t CSS support primitive functions like min()/max()?

blah {
width: max(50px,20%); // 20%& but not less than 50px
}

would really often be useful..




blah {

最小宽度:50px;

最大宽度:20%;

}


如果没有,请写信给你的国会议员在浏览器中工作

每个人都使用,他们似乎都在微软的工资单上。



blah {
min-width: 50px;
max-width: 20%;
}

Write to your congressman if this doesn''t work in the browser
everybody uses, they all seem to be on Microsoft''s payroll.


Steve Pugh< st ***@pugh.net>写道:
Steve Pugh <st***@pugh.net> wrote:
Timo Nentwig< tc*@spamgourmet.org>写道:
Timo Nentwig <tc*@spamgourmet.org> wrote:
为什么CSS不支持像min()/ max()这样的原始函数?
Why doesn''t CSS support primitive functions like min()/max()?



因为CSS不是编程语言,因此根本不包含任何功能?



Because CSS is not a programming language and therefore doesn''t contain
any functions at all?




好​​吧,有些功能实际上称为属性中的函数

声明:url(),counter()。



Well, there are some functions actually called functions in property
declarations: url(), counter().


这篇关于MIN()/ MAX()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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