CSS3: calc()

18/Nov/2013 182

Calc() es una propiedad CSS3 que permite realizar operaciones matemáticas simples sustituyendo un valor fijo por una expresión dinámica de medida, por ejemplo, sumando o dividiendo anchos de un contenedor.

Lamentablemente con calc() no podemos trabajar con valores expresados en otras propiedades (como las útiles variables de preprocesadores CSS), sino que se deben trabajar con valores definidos como se ve en el siguiente ejemplo:

width: calc(100%  - 10px);

Puedes utilizar las siguientes operaciones:

  • + (suma)
  • (resta)
  • * (multiplicación)
  • / (división)

Como ves en el ejemplo, puedes utilizar diferentes unidades en tu expresión de cálculo, y no se te ocurra dividir por cero (0).

Soporte: IE9+, Firefox 16+ (sin prefijo), Chrome 26+ (sin prefijo), Safari 6+.

Links:

Comentarios

  1. ivermectin for humans for sale [#]

    ivermectin 1% krГ©m generikum CSS3: calc() | CSSLab | Laboratorio de ideas web http://ivermectin1.com/ ivermectin cream uk

  2. singer gay dating [#]

    free gay singles dating https://gayedating.com/

  3. 100 free gay dating [#]

    gay hiv dating website https://gaydatinglosangeles.com/

  4. ivermectin human dosage [#]

    cheap stromectol CSS3: calc() | CSSLab | Laboratorio de ideas web https://ivermectin1.com/ buy ivermectin

  5. FelipeHaw [#]

    buying viagra
    what does viagra do canadian online pharmacy cialis generic viagra india universal pharmacy canadian prescription drugstore shopping online canada order cialis online canada canadian viagra online prescription codes best price for generic cialis
    metoprolol generic cialis canada viagra pharmacy online online canadian pharmacies viagra samples free

  6. quest bars in [#]

    Amazing blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple adjustements would really make
    my blog shine. Please let me know where you got your design. Thanks a lot quest bars http://bitly.com/3C2tkMR quest bars

  7. HenryUnfiP [#]

    top gay dating sites for free
    free gay chat dating sites uk
    gay dating sites for men

  8. bro4bros gay dating [#]

    100% free gay dating sites https://dating-gaym.com/

  9. bitly.com [#]

    It is truly a nice and useful piece of info. I’m satisfied that
    you simply shared this useful info with us. Please stay us
    informed like this. Thanks for sharing. scoliosis surgery https://0401mm.tumblr.com/ scoliosis surgery

  10. buy ivermectin for humans [#]

    stromectol 3mg cost CSS3: calc() | CSSLab | Laboratorio de ideas web http://ivermectin1.com/ stromectol

  11. terre haute gay dating [#]

    dating sites for gay geeks https://datinggayservices.com/

  12. best gay dating sites 2021 [#]

    a4a gay dating https://gayonlinedating.net/

  13. dating gay porn star [#]

    gay dating on adult websites https://gay-singles-dating.com/

  14. app.gumroad.com [#]

    Thanks for some other wonderful post. Where else may just anyone
    get that kind of info in such an ideal means of writing?

    I’ve a presentation subsequent week, and I’m at the look for
    such info. asmr https://app.gumroad.com/asmr2021/p/best-asmr-online asmr

  15. hydroxychloroquineMt [#]

    plaquenil and alcohol chloroquine brand name hydroxycloquin

  16. http://j.mp/3C42OCu [#]

    This is a topic that’s near to my heart… Take care!

    Where are your contact details though? cheap
    flights http://1704milesapart.tumblr.com/ cheap flights

  17. zithromaxeska [#]

    what is zithromax 500mg used for z pack indications zithromax coverage

  18. http://www.iherb.com/search?kw=questbars [#]

    I read this post completely regarding the comparison of latest and earlier technologies, it’s amazing article.
    quest bars https://www.iherb.com/search?kw=quest%20bars quest bars

  19. bitly.com [#]

    You are so interesting! I don’t suppose I’ve read
    something like that before. So nice to discover someone with unique thoughts on this subject matter.
    Seriously.. thank you for starting this up. This website is one thing that is required on the
    internet, someone with a little originality! ps4 https://bitly.com/3z5HwTp ps4

  20. http://coub.com/ [#]

    There’s certainly a lot to learn about this topic. I really like all of the points you have made.
    scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

  21. HenryUnfiP [#]

    top rated gay dating sites
    best gay dating webwite men
    gay facebook dating

  22. zithromaxeska [#]

    zithromax directions azithrom zithromax pfizer

  23. stromectolforte.com [#]

    stromectol gГ©nГ©rique https://stromectolforte.com/ ivermectin pill cost ivermectin

  24. does zyrtec raise blood pressure [#]

    allegra – https://allergyd.com

  25. allegra [#]

    zyrtec sale – http://allergyd.com

  26. generic zyrtec d walgreens [#]

    zyrtec side effects and warnings – https://allergyd.com

  27. nuvigilvsprovigil [#]

    https://provigilandmodafinil.com/ how long does modafinil last

  28. ivermectin for sale [#]

    General Dope Far this outcome
    https://ivermectstromect.com ivermectin for humans pills 12 mg
    https://stromectolivermect.com ivermectin 6 mg
    https://ivermectinst.com ivermectin over the counter
    https://ivermectinst.com ivermectin 6 mg
    https://ivermectinst.com ivermectin for sale

  29. ivermectin tablets order [#]

    stromectol uk buy https://stromectolforte.com/ ivermectin ซื้อออนไลน์ ivermectin 6mg dosage

  30. provigilprice [#]

    modalert modafinil schedule

  31. side effects of accutane [#]

    isotretinoina accutane for acne

  32. bactrim ds dosage [#]

    bactrim and alcohol bactrim for uti

CSSLab