Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html CSS:带div内联块的选择器可以移位吗?_Html_Css - Fatal编程技术网

Html CSS:带div内联块的选择器可以移位吗?

Html CSS:带div内联块的选择器可以移位吗?,html,css,Html,Css,我需要将磁盘图标更多地放在基线上,以便与文本对齐,此外,不要增加行之间的垂直空间 到目前为止,我的CSS代码如下所示: .openPage:after { content: ' '; background-position: center center; background-repeat: no-repeat; background-size: contain; width: 20px; height: 20px; padding: 0;

我需要将磁盘图标更多地放在基线上,以便与文本对齐,此外,不要增加行之间的垂直空间

到目前为止,我的CSS代码如下所示:

.openPage:after {
    content: ' ';
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    margin-left: 4px;
    display: inline-block;
    background-image: url(../rsc/home/kws.corn.icon.page.png);
}

垂直对齐:底部对齐;干得好

更改背景位置。。。向下几个像素应该可以解决这个问题……您是否尝试过垂直对齐:底部;或垂直对齐:文本底部;垂直对齐:底部对齐;干得好@然后写下答案