מסגרת עם HTML - איך זה עובד
כדי להפוך את המדיה באתר שלך ליותר מושכת, אתה יכול להשתמש בקוד HTML כדי לצייר מסגרת סביבו. בטיפ המעשי הזה, נראה לך איך זה עובד ומה היתרונות של גליונות סגנון מדורגים (CSS) מציעים בעת הגדרת מסגרת.
קידוד HTML - צייר מסגרות סביב תמונות ומדיה אחרת
כברירת מחדל, לכל תמונה יש מסגרת ברוחב פיקסל אחד. עם זאת, זה גלוי רק אם התמונה משמשת כהיפר-קישור. עם התכונה "גבול" אתה יכול להגדיר בנפרד את עובי המסגרת.
- ב- HTML, הקוד למסגרת שחורה בעשרה פיקסלים נראה כך:
- מסגרת זו מוחלת על כל ארבעת צידי האובייקט.
- לחלופין, אתה יכול להשתמש בתוכנית לעריכת תמונות כמו Gimp כדי לצייר את המסגרת סביב התמונה שלך.
- עם זאת, שים לב שהדבר יהפוך את התמונה לגדולה יותר וייקח יותר זמן עד שהמבקר באתר האינטרנט שלך יוריד את התמונה.
הגדירו את המסגרת במסמך HTML באמצעות CSS
אתה יכול להגדיר את המסגרת - למשל תיבה סביב טקסט - עם גיליונות סגנון מדורגים ביתר דיוק.
- טיפ מעשי נוסף מודיע לך כיצד לשלב קובץ CSS באתר שלך.
- במסמך CSS זה תוכלו להגדיר את הצבע והעובי של המסגרת באופן שונה עבור כל ארבעת העמודים:
- גבול-תחתון: # 999 - הגדרת הצבע למסגרת התחתונה. כאן תוכלו להשתמש גם ב"גבול-למעלה ", " גבול-ימין "או" גבול-שמאל ".
- רוחב גבול: 0 0 דק דק - מציין את רוחב הקו. זה נעשה בכיוון השעון. כאן פירוש הדבר שלא ניתן לראות קווים בחלק העליון והימני, בעוד קו מוגדר בתחתית ובשמאל.
- סגנון גבול: אין חריץ ללא חריץ - מגדיר את המסגרת הדקורטיבית לתמונה או לתיבה שלך. סגנון ה"גרוב "יוצר אפקט תלת מימד.
עמוד הבית שלכם חי באופן טבעי מנוכחותו ברשת. במאמר הבא תוכלו לקרוא את הטיפים הטובים ביותר לשיפור הדירוג בגוגל.