To prevent the form is opened or the div layer by a variety of methods open

    when we design the page, always encounter some unpleasant things, the most common than in the background add content found after page is opened, resulting in "extremely unsightly. Before we are basically designed form online for a lot of natural solutions, there is the div+css standard design method, rarely see good, now usually find the Xiaoxiang online form is good to prevent distraction method to summarize it, and everyone to share.

, directly in the page to set the image size, such as code: < img; src=" http://s.krjpg.cn/www.xxol.net.jpg" width=" 600" height=" 500" border=" 0" >, it can limit the size of the picture, but need to manually modify the upload pictures before the image size, or upload pictures will be deformed.

two, the use of the following code: < img src=" http://s.krjpg.cn/www.xxol.net.jpg" onload=" javascript:if (this.width> 600}{this.resized=true; this.style.width=600" >

this way when the picture is called automatically, scaled to the specified width, the deformation will not cause the picture, and will not break the table, but the drawback is that, if the picture is too large, in the process of downloading pictures, is the picture display process, will be displayed in the original image size, then it will burst table, the page is ugly, two when the full picture display, the picture will automatically shrink.

three, we can according to the table attribute to limit the size of prevent is opened, for example in < table width=" 600" border=" 0" cellpadding=" 0" cellspacing=" 0" > adding code "style=" table-layout:fixed; word-wrap:break-word; word-break; break-all; "" table-layout:fixed ", which is to;" the table layout is fixed, we can effectively prevent the form is opened, "word-wrap:break-word;" is the control of the line, but also l

Leave a Reply

Your email address will not be published. Required fields are marked *