Home > CMS Tutorial > DEDECMS > body text

Why does the DedeCMS slideshow call image appear blurry?

藏色散人
Release: 2019-12-02 09:25:52
Original
1686 people have browsed it

Why does the DedeCMS slideshow call image appear blurry?

Why does the DedeCMS slideshow call image appear blurry?

Many people who use Dreamweaver to build a website encounter a problem that the slideshow on the homepage of the dedecms website calls article thumbnails. If the aspect ratio of our actual picture and the ratio of the slide are too different If so, the slideshow image displayed on the homepage will automatically stretch and become blurred. This does seem to be a problem that affects the user experience. Let’s analyze two methods to solve this problem.

The first solution: Manually crop thumbnails

Although the method of manual cropping thumbnails is a bit more cumbersome, it is very practical and can display the slideshow images accurately. The specific method is to use Some image processing tools such as Photoshop or Meitu Xiuxiu can make the image into the same size and proportion as the slide, and then upload it manually. This is fine. The advantage is that the slide image is of appropriate size, very clear and of very good quality. , the disadvantage is that it is very troublesome to use tools to manually crop thumbnails every time you publish an article.

The second solution is to modify the DreamWeaver code to automatically call images in equal proportions

Automatically call images in equal proportions. This method is also more practical and can automatically transfer any images we upload. The size of the picture is automatically adjusted to a fixed size ratio. The advantage of this method is that it is automatically generated, simple and fast, but the disadvantage is that there is no way to distinguish the horizontal and vertical ratio pictures. If the horizontal ratio pictures are compressed according to the numerical ratio pictures, the pictures will be distorted. The specific modification method is as follows:

Open the index.htm file of the home page template of the Dreamweaver website or the web page template that requires a slideshow, and find the following code to read the thumbnail:

for(i=1;i
Copy after login

us Modify this dreamweaver code to the following code:

for(i=1;i
Copy after login

After the modification is completed, clear the cache and regenerate the homepage.

The above is the detailed content of Why does the DedeCMS slideshow call image appear blurry?. For more information, please follow other related articles on the PHP Chinese website!

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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!