小编san*_*aqu的帖子

可能在UL左/右的CSS垂直滚动条填充?

是否可以在滚动条项目或滚动条轨道周围添加填充或边距?我试过了,只能填充顶部/底部.向UL添加填充对滚动条没有影响.滚动条上的负边距无效.想法? JS小提琴在这里.

::-webkit-scrollbar {
width: 12px;
margin:10px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
-webkit-border-radius: 10px;
border-radius: 10px;
padding: 10px
}

::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
background: rgba(255,0,0,0.8); 
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}
::-webkit-scrollbar-thumb:window-inactive {
background: rgba(255,0,0,0.4); 
Run Code Online (Sandbox Code Playgroud)

css scrollbar

29
推荐指数
5
解决办法
6万
查看次数

PHP数组的stdClass,如何获取数据?

我想打印[name]的值.我只是熟悉标准定义的类以及如何调用它们.

基于这个例子和逻辑

$arrayobj = new ArrayObject(array('first','second','third'));
print_r($arrayobj);
//outputs: ArrayObject Object ( [0] => first [1] => second [2] => third )
Run Code Online (Sandbox Code Playgroud)

接着就,随即.我试图从这里提取名称(Pebbles)的值.

print_r($terms);
/* outputs
Array ( [3] => stdClass Object ( [term_id] => 3 [name] => Pebbles ) )
*/
Run Code Online (Sandbox Code Playgroud)

所以我试过了

echo $terms[0]->name;
Run Code Online (Sandbox Code Playgroud)

有花生.我该怎么做呢?

php arrays stdclass

7
推荐指数
1
解决办法
6921
查看次数

标签 统计

arrays ×1

css ×1

php ×1

scrollbar ×1

stdclass ×1