Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

String.prototype.fontsize()

Niestandardowy
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Podsumowanie

Powoduje wyświetlenie łańcucha znaków w określonym rozmiarze czcionki, tak jak to było w znaczniku <font>.

Składnia

str.fontsize(size)

Parametry

size 
Liczba całkowita pomiędzy 1 a 7, łańcuch znaków reprezentujący rozmiar znaku liczby całkowitej między 1 a 7.

Opis

Kiedy określisz rozmiar jako liczbę całkowitą, ustaw rozmiar stringName na jeden z 7 innych rozmiarów. Kiedy określisz size łańcucha znaków jako "-2", to dostosujesz rozmiar czcionki stringName relatywnie do rozmiaru jaki został ustawiony w znaczniku <basefont>.

Przykłady

Przykład: Zastosowanie fontsize()

var worldString = "Witaj, Świecie";

console.log(worldString.small());     // <small>Witaj, Świecie</small>
console.log(worldString.big());       // <big>Witaj, Świecie</big>
console.log(worldString.fontsize(7)); // <fontsize=7>Witaj, Świecie</fontsize>

Zobacz także

Autorzy i etykiety dokumentu

 Autorzy tej strony: teoli, Ptak82, Mgjbot
 Ostatnia aktualizacja: teoli,