Samouczek CSS

Strona główna CSS Wprowadzenie do CSS Składnia CSS Selektory CSS Instrukcje CSS Komentarze CSS Kolory CSS Tła CSS Granice CSS Marginesy CSS Dopełnienie CSS Wysokość/szerokość CSS Model skrzynki CSS Zarys CSS Tekst CSS Czcionki CSS Ikony CSS Linki CSS Listy CSS Tabele CSS Wyświetlanie CSS Maks. szerokość CSS Pozycja CSS CSS Z-indeks Przepełnienie CSS zmiennoprzecinkowy CSS Wbudowany blok CSS Wyrównanie CSS Kombinatory CSS CSS Pseudo-klasa Pseudoelement CSS Krycie CSS Pasek nawigacyjny CSS Listy rozwijane CSS Galeria obrazów CSS Sprite obrazu CSS Selektory atrybutów CSS Formularze CSS Liczniki CSS Układ strony internetowej CSS Jednostki CSS Specyfika CSS CSS !ważne Funkcje matematyczne CSS

Zaawansowane CSS

Zaokrąglone rogi CSS Obrazy obramowania CSS Tła CSS Kolory CSS Słowa kluczowe w kolorze CSS Gradienty CSS Cienie CSS Efekty tekstowe CSS Czcionki internetowe CSS Przekształcenia CSS 2D Przekształcenia CSS 3D Przejścia CSS Animacje CSS Etykietki CSS Obrazy w stylu CSS Odbicie obrazu CSS Dopasowanie obiektu CSS Pozycja obiektu CSS Maskowanie CSS Przyciski CSS Paginacja CSS Wiele kolumn CSS Interfejs użytkownika CSS Zmienne CSS Rozmiar pola CSS Zapytania o media CSS Przykłady CSS MQ Flexbox CSS

CSS Responsywne

Wprowadzenie do RWD Okienko RWD Widok siatki RWD Zapytania dotyczące mediów RWD Obrazy RWD Filmy RWD Ramy RWD Szablony RWD

Siatka CSS

Wprowadzenie do siatki Pojemnik na siatkę Element siatki

CSS SASS

Samouczek SASS

Przykłady CSS

Szablony CSS Przykłady CSS quiz css Ćwiczenia CSS Certyfikat CSS

Odniesienia CSS

Dokumentacja CSS Selektory CSS Funkcje CSS Dźwięk referencyjny CSS Bezpieczne czcionki internetowe CSS Animowalny CSS Jednostki CSS Konwerter CSS PX-EM Kolory CSS Wartości kolorów CSS Domyślne wartości CSS Obsługa przeglądarki CSS

Zaokrąglone obramowania CSS


Zaokrąglone obramowania CSS

Właściwość border-radiussłuży do dodawania zaokrąglonych obramowań do elementu:

Normalna granica

Okrągła granica

Zaokrąglone obramowanie

Najbardziej zaokrąglona granica

Przykład

p {
  border: 2px solid red;
  border-radius: 5px;
}

Więcej przykładów


Ten przykład przedstawia skróconą właściwość do ustawiania wszystkich właściwości górnej krawędzi w jednej deklaracji.


Ten przykład pokazuje, jak ustawić styl dolnego obramowania.


W tym przykładzie pokazano, jak ustawić szerokość lewego obramowania.


W tym przykładzie pokazano, jak ustawić kolor czterech obramowań. Może mieć od jednego do czterech kolorów.


Ten przykład pokazuje, jak ustawić kolor prawego obramowania.


Sprawdź się za pomocą ćwiczeń

Ćwiczenie:

Użyj skróconej własności border, aby ustawić obramowanie "4px", "dotted", "red" dla elementów <p>.

<style>
p {
  : ;
}
</style>

<body>
  <h1>This is a heading</h1>
  <p>This is a paragraph</p>
  <p>This is a paragraph</p>
</body>


Wszystkie właściwości obramowania CSS

Property Description
border Sets all the border properties in one declaration
border-bottom Sets all the bottom border properties in one declaration
border-bottom-color Sets the color of the bottom border
border-bottom-style Sets the style of the bottom border
border-bottom-width Sets the width of the bottom border
border-color Sets the color of the four borders
border-left Sets all the left border properties in one declaration
border-left-color Sets the color of the left border
border-left-style Sets the style of the left border
border-left-width Sets the width of the left border
border-radius Sets all the four border-*-radius properties for rounded corners
border-right Sets all the right border properties in one declaration
border-right-color Sets the color of the right border
border-right-style Sets the style of the right border
border-right-width Sets the width of the right border
border-style Sets the style of the four borders
border-top Sets all the top border properties in one declaration
border-top-color Sets the color of the top border
border-top-style Sets the style of the top border
border-top-width Sets the width of the top border
border-width Sets the width of the four borders