Cadru cu HTML - cum funcționează
Pentru ca mass-media de pe site-ul dvs. să fie mai atrăgătoare, puteți utiliza cod HTML pentru a desena un cadru în jurul său. În acest sfat practic, vă vom arăta cum funcționează și ce avantaje oferă foile de stil în cascadă (CSS) atunci când definiți un cadru.
Codare HTML - desenează cadre în jurul imaginilor și al altor suporturi
În mod implicit, fiecare imagine are un cadru cu o lățime de un pixel. Cu toate acestea, acest lucru este vizibil numai dacă imaginea este utilizată ca un hyperlink. Cu atributul „border”, puteți defini individual grosimea cadrului.
- În HTML, codul pentru o rama neagră de zece pixeli arată în felul următor:
- Acest cadru este aplicat pe toate cele patru laturi ale obiectului.
- În mod alternativ, puteți utiliza un program de editare a imaginilor, cum ar fi Gimp, pentru a desena cadrul din jurul imaginii.
- Cu toate acestea, vă rugăm să rețineți că acest lucru va face ca imaginea să fie mai mare și va dura mai mult timp vizitatorul pe site-ul dvs. web pentru a descărca imaginea.
Definiți cadrul din documentul HTML cu CSS
Puteți defini cadrul - de exemplu, o casetă din jurul unui text - cu foi de stil în cascadă chiar mai precis.
- Un alt sfat practic vă oferă cum să integrați un fișier CSS în site-ul dvs. web.
- În acest document CSS puteți seta culoarea și grosimea cadrului diferit pentru toate cele patru pagini:
- border-bottom: # 999 - Setează culoarea cadrului de jos. Aici puteți utiliza, de asemenea, „border-top”, „border-right” sau „border-left”.
- border-width: 0 0 subțire subțire - Specifică grosimea liniei. Aceasta se face în sensul acelor de ceasornic. Aici înseamnă că nu se pot vedea linii în partea de sus și la dreapta, în timp ce o linie subțire a fost definită în partea de jos și stânga.
- stil de bordură: niciunul nici o canelură - definește cadrul decorativ pentru poza sau cutia dvs. Stilul „canelură” creează un efect 3D.
Pagina dvs. principală trăiește în mod natural din prezența sa pe net. În articolul următor, veți citi cele mai bune sfaturi pentru îmbunătățirea clasamentului dvs. Google.