Example of text wrapping in html (mixed html image and text)_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:38:20
Original
2092 people have browsed it

1. Text wrapped around the image

If we use normal ones, for example:

Copy the code
The code is as follows:





This is ordinary. Among the domestic VB websites, vbgood is updated daily and has a rich amount of information, and is very popular among program enthusiasts.

In such a sentence, if the image is taller than the text, there will be a blank space above the text. The effect of the page is very poor. How to solve it? Please look at this code:

Copy the code
The code is as follows:





This is a wraparound arrangement. Among the domestic VB websites, vbgood is updated daily and has a rich amount of information, and is very popular among program enthusiasts.


Add this attribute to the img element to solve the problem: align="center", the problem is It can be solved. Keep it simple! As for hspace, it defines the width of the picture and surrounding elements. It doesn't matter whether it is bypassed or not.

How was this done? Take a look at this code first:

Copy the code
The code is as follows:




In
among the domestic VB websites, vbgood is updated daily and has a rich amount of information, and is deeply loved by program enthusiasts. (End)


How to achieve such an effect?

Copy code
The code is as follows:




In
among the domestic VB websites, vbgood is updated daily and has a rich amount of information, and is deeply loved by program enthusiasts. (End)


This code explains it. If you are smart, you will know it at a glance. Just zoom in. Just put the words in this table.

But now if I want the text to have a background color, what should I do? Ha, you are so smart, add the bgcolor attribute to the table, like this:

Copy the code
The code is as follows:



In the domestic VB website vbgood is updated daily, The amount of information is rich, and it is very popular among program enthusiasts. (End)


But can it come out? No, I have to add something (remember not to answer so quickly next time:), like this:

Copy code
The code is as follows:



at
Among the domestic VB websites, vbgood is updated daily and has a rich amount of information, and is very popular among program enthusiasts. (End)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template