javascript - 如何使用 css 内容显示图像?
问题描述
我有以下代码,该代码在页面上显示了一些信息。在内容行中,它在我的网站上显示了一个文本,但我想在该文本附近放置一个图像,这对我来说似乎很难
{
"id": 85,
"parent": null,
"created": "2019-02-06",
"modified": "2019-02-06",
"content": "Vielen Dank. Funktioniert immernoch perfekt!!!",
"pings": [],
"creator": 6,
"fullname": "LinusKniepmann",
"profile_picture_url": "./img/ppl/3.jpg",
"created_by_admin": false,
"created_by_current_user": false,
"upvote_count": 3,
"user_has_upvoted": false,
"is_new": true
},
所以我想在附近放一张图片
“内容”:“Vielen Dank。Funktioniert immernoch perfekt!!!”
有没有办法在内容代码中输入图像?
解决方案
background-image: url("images/2019-01-10_093A45.jpg");
background-repeat: no-repeat;
width: 180px; /* Width of your image */
height: 236px;
top: 100px; /* Customize to your position preference */
left: 100px;
推荐阅读
- javascript - 网页上不同 div/span 的不同选择颜色
- javascript - 我不能使用 Node.JS 调用在另一个函数中创建的函数
- reactjs - 如何等待来自嵌套请求的 React 评估值?
- asp.net-core - 只有在 AspNetUsers 上的“EmailConfirmed”字段为真(NETCORE 3.1)时,具有有效凭据的用户才能登录
- django - Django Rest Framework 中的自定义字段验证
- python - tolist的numpy数组非常慢
- php - CakePHP 4 JSON 列值查找或设置别名
- react-native - 在 React Native 应用程序中使用的 SignalR npm 包
- python - Python 代码在 Mac 终端中运行,但不在 Neovim 中
- android - Unity 排行榜在 Play 商店发布后无法使用