Web Front-End-defects of n methods for image exposure replacement (2)

Source: Internet
Author: User

Something happened temporarily yesterday. Sorry, this time I made up the unfinished part! Next we will introduce the fourth part:

 

No. 4 IFR and sifr

 

Image replacement is mainly intended to solve the problem of missing fonts on most computers. In order to replace text with text images, Mike David son and Shaun Inman created a more novel approach.

 

Flash allows font embedding in SWF files, so they do not replace text with images, but Replace text with Flash files. The replacement method is to use javascrip to search for a document and find all the text in a specific element or element with a specific class name. Then, mongocrip replaces the text with a small flash file. The next step is really amazing. Let's take a look. This technology does not create a separate FLASH file for each text segment, but instead places the replaced text into a duplicate flash file. Therefore, you only need to add a class to trigger image replacement, flash and commit Crip will complete the rest of the work. Another advantage is that text in Flash files can be searched, which means that it can be copied easily.

 

Shaun Inman discloses his image replacement method and explicitly replaces it with an ifr image. IFR is a lightweight method. For details about this method, go to http://www.cnblogs.com/jiawl/admin/editposts.aspx.pdf.

 

Mike David son expanded this method and created the sifr replacement method. This method allows you to replace and change the font size of multiple lines of text.

 

To use this method on a site, download the latest version from http://www.cnblogs.com/jiawl/admin/editposts.aspx. Installing sifr on the site is very simple, but you should read the documentation. First, open the Flash file, embed the desired font, and export the video. To enable sifr to avoid errors, the following prints and screen styles should be included. Now, add the javascrip file to every page that you want to use sifr. You can configure this file to specify the elements to replace, text color, fill, case, and many other style attributes. After the configuration is complete, upload all the files to the server and perform a test. Now you will find that these originally part of the file has become dynamic Flash content.

 

However, it is a bit bad: page loading is involved. For a relatively large website, the page must be loaded to display the page, the dynamic text may be displayed only a few flashes.

 

Although this problem will not cause other mistakes, it will also give users the impression that the page loading speed is slow. Therefore, these replacement technologies are not perfect and I would like to advise you, don't look at these Replacement Methods on the Internet. I feel as excited as I have found my favorite girl or Prince Charming. Isn't it so perfect for you? Well, I don't have to worry about this, because you should have your own experience after reading this, And you should use it with caution, which is not completely unavailable. Of course, we can also create our own technologies. It is your own problem to make them public. Development of anything is not a dead mode. We are exploring it slowly, and we can always see our own mode! Come on !!

(Like to learn and want to discuss with me a variety of Web Knowledge left your mailbox or contact information, or with me mail 747850255@qq.com reprint Please consciously attach reprinted address, from the blog Park "Opening Audi next year ")

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.