# The operating environment of this tutorial: windows7 system, CSS3 version, Dell G3 computer. You can use the content attribute of CSS. The attribute information is as follows:How to set the src of img in css: First create an HTML sample file; then define the src of img by setting the css code to "img{content:url(https://image.png);}" That’s it.
The definition code is as follows: [Recommended:
css video tutorial]
<style> img { content:url(https://image.png); } </style>
The above is the detailed content of How to set the src of img in css. For more information, please follow other related articles on the PHP Chinese website!