首页 > 解决方案 > 如何使用 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!!!”

有没有办法在内容代码中输入图像?

标签: javascriptphpcsshtml

解决方案


  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;


推荐阅读