Get the App
SLTechnology News&Howtos  ›  Development  › 

How does WeChat Mini Programs add a small icon to the input box?

Shulou Source: shulou.com Published: 2022-06-01 00:24:39 10月04日 Update

Today, I would like to share with you how WeChat Mini Programs realizes the relevant knowledge of adding small icons to the input box. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

The page is as follows:

Then, as you did on the html page, you added the background-image attribute to the input box. Unexpectedly, Mini Program reported the following error:

Emmmm seems that the background-image attribute of Mini Program is not powerful, and then after consulting the relevant information, give up the background-image attribute.

Then take a different approach. In Mini Program, it seems that only image tags can load local images, so consider using image tags to achieve this. The general idea is that in a view, there is an image on the left and an input box on the right. The wxml page is as follows:

These are all the contents of the article "how to add a small icon to WeChat Mini Programs's input box". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Programs knowledge articles attributes pages icons Chinese plus content that is tags different big unexpected other ways only right pictures most ideas. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn Microsoft Huawei Shulou Tech Info