Программисты Html
-
Anonymous
Охватывает элемент списка в упорядоченном списке, который я хочу скрыть, если его первый или последний элемент списка
Сообщение
Anonymous »
У меня есть упорядоченный список, который выглядит так: < /p>
Код: Выделить всё
#trash-btn {
width: 33px;
height: 40px;
margin-top:10px;
margin-right:30px;
background-image: url('../images/trash.png');
background-size: cover;
background-color: DimGray;
border: 0;
}
#up-btn {
width: 40px;
height: 40px;
margin-top:10px;
margin-right:30px;
background-image: url('../images/up.png');
background-size: cover;
background-color: DimGray;
border: 0;
display: inline;
}
#down-btn {
width: 40px;
height: 40px;
margin-top:10px;
margin-right:30px;
background-image: url('../images/down.png');
background-size: cover;
background-color: DimGray;
border: 0;
display: inline;
}
.span-right {
display: inline-block;
float: right;
background-position: center;
vertical-align: middle;
}
li.no-num {
list-style-type: none;
}
li.region-list {
background: #5e5e5e;
color: rgb(250, 250, 250);
padding: 10px;
border-radius:20px;
height: 70px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
ol li::before {
content: '';
width: 50px;
height: 70px;
display: inline-block;
margin-right: 5px;
z-index: 10;
background-position: center;
vertical-align: middle;
}
ol#sectionList:first-child #up-btn {
display:none;
}
ol#sectionList:last-child #down-btn {
display:none;
}
[list]
[*]Item 1
Подробнее здесь: [url]https://stackoverflow.com/questions/79675924/spans-inside-a-list-item-in-an-ordered-list-that-i-wish-to-hide-if-its-first-or[/url]
1750672186
Anonymous
У меня есть упорядоченный список, который выглядит так: < /p>
[code]
#trash-btn {
width: 33px;
height: 40px;
margin-top:10px;
margin-right:30px;
background-image: url('../images/trash.png');
background-size: cover;
background-color: DimGray;
border: 0;
}
#up-btn {
width: 40px;
height: 40px;
margin-top:10px;
margin-right:30px;
background-image: url('../images/up.png');
background-size: cover;
background-color: DimGray;
border: 0;
display: inline;
}
#down-btn {
width: 40px;
height: 40px;
margin-top:10px;
margin-right:30px;
background-image: url('../images/down.png');
background-size: cover;
background-color: DimGray;
border: 0;
display: inline;
}
.span-right {
display: inline-block;
float: right;
background-position: center;
vertical-align: middle;
}
li.no-num {
list-style-type: none;
}
li.region-list {
background: #5e5e5e;
color: rgb(250, 250, 250);
padding: 10px;
border-radius:20px;
height: 70px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
ol li::before {
content: '';
width: 50px;
height: 70px;
display: inline-block;
margin-right: 5px;
z-index: 10;
background-position: center;
vertical-align: middle;
}
ol#sectionList:first-child #up-btn {
display:none;
}
ol#sectionList:last-child #down-btn {
display:none;
}
[list]
[*]Item 1
Подробнее здесь: [url]https://stackoverflow.com/questions/79675924/spans-inside-a-list-item-in-an-ordered-list-that-i-wish-to-hide-if-its-first-or[/url]
-
-
- 0 Ответы
- 4 Просмотры
-
Последнее сообщение Anonymous
-
-
- 0 Ответы
- 7 Просмотры
-
Последнее сообщение Anonymous
-
-
- 0 Ответы
- 3 Просмотры
-
Последнее сообщение Anonymous
-
-
- 0 Ответы
- 4 Просмотры
-
Последнее сообщение Anonymous
-
-
Первый и последний элемент Python в списке
Anonymous »
» в форуме
Python
Есть ли способ разрезать только первый и последний элемент списка?
Например; Если это мой список:
>>> some_list
Я хочу сделать это (очевидно, недопустимый синтаксис):
>>> first_item, last_item = some_list
>>> print first_item
'1'
>>> print...
- 0 Ответы
- 15 Просмотры
-
Последнее сообщение Anonymous