Media Types

postat acum 4 ani de Stefanescu Mihai in categorie CSS

Unul dintre cele mai mari avantaje ale CSS-ului este ca poti specifica pe ce tip de media va fi prezentat continutul: ecran, hartie, tableta, telefon, s.a.m.d.

Pentru a stabili tipurile de media avem doua optiuni:

  • putem specifica tipul de media direct din fisierul de stil folosind @media
  • Putem stabili asta in headerul documentului HTML

Regula @media

Regula @media specifica tipul de media dorit (daca sunt mai multe se separa prin virgula).

@media print {
    body { font-size: 100%; }
  @media screen {
    body { font-size: 1.2em; }
  @media screen, print {
    body { line-height: 24px; }

In documentul HTML

In HTML 4.0 atributul media specificat in elementul LINK trebuie sa precizeze tipul de media.

<link rel="stylesheet" type="text/css" media="print, handheld" href="stil_print.css">

Tipuri de media

Numele tipurilor de media sunt destul de explicative pentru dispozitivele dorite.

Mai jos am scris o lista cu tipurile de media:

Valoare Descriere
 all  Potrivit pentru toate dispozitivele
 aural  Creeat pentru sintetizatoare de vorbire
 braille  Creeat pentru dispozitivele tactile
 embossed  Creeat pentru dispozitive ce printeaa folosind limbajul braille
 handheld  Potrivit pentru telefoane, smartphone-uri, si alte dispozitive cu ecran mai mic (in CSS3 au fost introduse o serie de media types creeate special pentru smartphone-uri si tablete, acestea se vor gasii intr-un articol separat)
 print  Potrivit pentru print.
 projection Potrivit pentru proiectar.
 screen  Potrivit pentru computere


Sunt un tanar programator din Bucuresti ce lucreaza in PHP/Mysql (MySqli/PDO), Laravel, CodeIgniter, MySQL, PostgreSQL, Wordpress, HTML5/CSS3, Sass, Photoshop si multe altele.
Google+ Community Facebook Group
Acest articol a fost mutat de pe vechea platforma.
Pentru orice eroare aparuta la mutare va rog sa ma contactati!

Comentariu postate de minecraft download mojang la data de 13.05.2019
It's difficult to find experienced people on this topic, however, you seem like you know what you're talking about! Thanks
Comentariu postate de minecraft download pc la data de 16.05.2019
Hi, I think your site might be having browser compatibility issues. When I look at your blog in Firefox, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, superb blog!
Comentariu postate de minecraft free download pc la data de 16.05.2019
Please let me know if you're looking for a writer for your blog. You have some really good posts and I feel I would be a good asset. If you ever want to take some of the load off, I'd absolutely love to write some content for your blog in exchange for a link back to mine. Please send me an e-mail if interested. Thank you!
Comentariu postate de jordan retro la data de 16.05.2019
My wife and i felt absolutely thankful when Chris could carry out his homework via the ideas he came across out of your site. It's not at all simplistic just to possibly be giving freely tips and hints which usually other people have been making money from. And we also keep in mind we need the website owner to be grateful to for that. The explanations you've made, the straightforward website navigation, the friendships you make it easier to foster - it's all fabulous, and it is making our son in addition to our family consider that this article is entertaining, which is rather indispensable. Many thanks for the whole thing!
Comentariu postate de how to download minecraft la data de 17.05.2019
I appreciate, result in I found just what I used to be looking for. You have ended my four day long hunt! God Bless you man. Have a nice day. Bye