【发布时间】:2019-03-24 18:03:18
【问题描述】:
我正在尝试获取关于 26 岁的 wordpress 儿童主题的视频背后的图像。我尝试使用以下文件路径。
background: url('../images/image.jpg’);
我有一张图片
.wp-block-video.aligncenter {
text-align: center;
border-style: solid;
但图像不会出现在它后面 我修改了代码但没有用
background-image: {
url('..images/('alliswell.ie_video_2018.jpg');
width:100px;
height:100px;
};
网站是 alliswell.ie
【问题讨论】:
-
删除(在'alliswell之前
-
您的代码中有一些拼写错误。这应该是: url('..images/('alliswell.ie_video_2018.jpg'); --> url('..images/alliswell.ie_video_2018.jpg'); 另外,这里的引号不匹配: background: url('../images/image.jpg'); 也就是说,这些图片真的存在吗?检查控制台是否有404错误,它会告诉你路径是否错误。
-
thnak 你,我忘记了代码的开头,它必须插入到你的代码工作的 div 中,我必须添加大括号..wp-block-video.aligncenter{ background-image :网址(alliswell.ie/wp-content/uploads/2018/09/...);背景重复:不重复;背景尺寸:封面; } – 帕特里克昨天
标签: css wordpress image background-image