www html, html уроки, html теги, css, верстка
статьи html уроки книги по css и html урокам вопросы и ответы Помощь сайту
Главная страница > Свойства CSS (ЦСС) > border-top-width
Свойства CSS (ЦСС)
Все свойства
!important
@import
@media
active
after
background
background-attachment
background-color
background-image
background-position
background-repeat
before
border
border-bottom
border-bottom-color
border-bottom-style
border-bottom-width
border-collapse
border-color
border-left
border-left-color
border-left-style
border-left-width
border-right
border-right-color
border-right-style
border-right-width
border-spacing
border-style
border-top
border-top-color
border-top-style
border-top-width
border-width
bottom
caption-side
clear
clip
color
content
counter-increment
counter-reset
cursor
direction
display
empty-cells
first-child
float
focus
font
font-family
font-size
font-style
font-variant
font-weight
height
hover
left
letter-spacing
line-height
link
list-style
list-style-image
list-style-position
list-style-type
margin
margin-bottom
margin-left
margin-right
margin-top
max-height
max-width
min-height
min-width
opacity
outline
outline-color
outline-style
outline-width
overflow
padding
padding-bottom
padding-left
padding-right
padding-top
position
quotes
right
table-layout
text-align
text-decoration
text-indent
text-transform
top
unicode-bidi
vertical-align
visibility
visited
white-space
width
word-spacing
z-index
CSS (ЦСС) по категориям
Цвет и фон
Границы
Шрифт
контент
Списки
Форматирование
Позиционирование
Отступы
Поля
Таблицы
Интерфейс
Важность
Псевдоэлементы
Псевдоклассы
Контент

border-top-width

Браузер Internet ExplorerInternet Explorer NetscapeNetтscape OperaОпера SafariSafari Файер фохMozilla Firefox
Версия 5.5 6.0 7.0 8.0 8.0 9.0 7.0 8.0 9.2 9.5 1.3 2.0 3.1 1.5 2.0 3.0
Поддерживается Да Да Да Да Да Да Да Да Да Да Да Да Да Да Да Да

Краткая информация

CSS (ЦСС) CSS (ЦСС)1
Значение по умолчанию medium
Наследуется Нет
Применяется Ко всем элементам
Аналог ШТМЛ <img border > | <table border>
Ссылка на спецификацию http://www.w3.org/TR/CSS21/box.ШТМЛ#border-width-properties

Описание

Устанавливает толщину границы сверху элемента.

Синтаксис

border-top-width: thin | medium | thick | значение

Аргументы

Три переменные — thin (2 пиксела), medium (4 пиксела) и thick (6 пикселов) задают толщину границы слева. Для более точного значения, толщину можно указывать в пикселах или других единицах.

Пример

ШТМЛ 4.01CSS (ЦСС) 2.1IE 5.5IE 6IE 7Op 9.5Sa 3.1Ff 2.0Ff 3.0

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/HTML4/strict.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>border-top-width</title>
  <style type="text/CSS (ЦСС)">
   H1 {
    border-top-color: green; /* Цвет линии сверху */
    border-top-style: double; /* Стиль линии сверху */
    border-top-width: 7px; /* Толщина линии сверху */
    border-right-color: green; /* Цвет линии слева */
    border-right-style: double; /* Стиль линии */
    border-right-width: 5px; /* Толщина линии */
    padding: 7px; /* Поля вокруг контента */
    color: #f9b61c; /* Цвет контента */
   }
  </style>
 </head>
 <body> 

  <h1>Lorem ipsum dolor sit amet</h1>
  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed 
     diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam 
     erat volutpat. Ut wisis enim ad minim veniam, quis nostrud exerci 
     tution ullamcorper suscipit lobortis nisl ut aliquip 
     ex ea commodo consequat.</p>

 </body>
</html>

Результат данного примера показан ни рис. 1.

Рис. 1

Рис. 1. Применение параметра border-top-width

Объектная модель

[window.]document.getElementById("elementID").style.borderTopWidth

Copyright © 2009-2022 | По всем вопросам: donmobi@mail.ru

О нашем Internet проекте | Наши планы | Контент нашего сайта | Есть ошибки... | Технологии | Поддержать проект