Traditional Culture Encyclopedia - Tourist attractions - How to make dede dream weaver make adaptive dream weaver how to make adaptive code

How to make dede dream weaver make adaptive dream weaver how to make adaptive code

How to adapt the thumbnail of dede homepage to the width and height, 200 points reward. I have three ideas.

The first idea is that you keep the proportions of the thumbnails displayed on the page consistent. The size may be different, but the proportions should be the same. Just change the template file, preferably the template for the list page, so it won't affect the appearance too much. Because the thumbnails are the same image when the system is used, although the sizes are different when we use it, the proportions should be the same, otherwise the image will be distorted.

Dede provides default thumbnail size settings, which are set in core=>: Settings for image settings in attachments.

When publishing an article, you can click the thumbnail option to crop it, and the proportion will be cropped according to the proportion set above.

The second idea is that if you insist on not moving the background, you can generate several thumbnails for the homepage, list page, slideshow, etc. However, this workload is relatively large, and many places need to replace other people's systems.

The third idea is implemented using js code and CSS code. Thumbnails are set according to the size of the occasion (such as a slide show). When used on other occasions, js code is used for cropping and displaying at both ends. Doing so may make the page longer and slower.

I won’t say much about the first and second ones.

I am interested in the third one. I searched the entire Internet and didn't see a suitable program, so I modified it based on what was available online. Just put the following code into your template page.

The following piece of js is currently available on the entire network. It really does not deform the js image and can be scaled to any size. Of course there is also tailoring, mainly taking the middle part. script>/**Detect image properties*/

Function CheckProperty(obj){

varImgObj=newImage();

imgobj.src=obj.src ;

FileObj=ImgObj

if(ImgObj.readyState!="complete")//If the image is unloaded, perform loop detection.

{

setTimeout("checkproperty(fileobj)", 500);

}

ImgFileSize=math.round(imgobj. filesize/1024*100)/100; //Get the size of the image file

//Get the width of the image

ImgWidth=ImgObj.width

// Get the height of the image

ImgHeight=ImgObj.height

Set the center (object)

zoom(obj, ImgWidth, imgheight);

}

//Set the upper div of the image

Function setCenter(obj){

obj.parentnode.style.display='block';

p>

obj.parentnode.style.width=obj.width;

obj.parentnode.style.height=obj.height;

obj.parentnode.style.overflow ='hidden';

obj.parentnode.style.verticalalign='middle';

obj.parentnode.style.textalign='center';

}

//Start scaling

Function scaling (object, width, height){

varleft=0;

vartop=0 ;

MW=obj.width/width;

MH=obj.height/height;

If (Mw

top= math.floor((old-obj.height)/2);

} Otherwise {

//Keep the height and change the width.

old=obj.width

obj.width=obj.height*width/height;

Left=math.floor((old-obj.width )/2);

}

//alert(top''left);

//obj.style.margin="-100px0px0px0px";

obj.style.margin=top'px'left'px';

}

//End of modification

div> img src='Image address'onload='CheckProperty(this)'width="100"height="50">/div>

Description: Description:

Each call When doing so, you must replace the img in the template with the div>..../div> code. . . >Part of the content. Include the div> tag. Don’t add anything more in the middle of the div>. If necessary, you can put it in the middle of the upper div>. Each time it is called,

What is the detailed process of the Dreamweaver imitation station?

1. Find the target website and analyze its structure. 2. Use tools to download the pages that need to be imitated, including HTML files, pictures, css and js files, etc. 3. Use Dreamweaver to edit the HTML files and copy the html files. Apply the unique tags of the Dream template. 4. After replacing the tags, replace them in the Dreamweaver template file. 5. After the templates are ready, generate the static files in the background and it will be ok.

How to modify the dede prompt in the DreamWeaver backend?

The front desk prompts to modify the file include/common.func.php and the background prompts to modify the dede/sys_data_done.php file. Just find the "DedeCMS prompt information" in the corresponding file and modify it directly. There should be two places. Modification of the system menu: dedeincinc_menu.php Before modification, please pay attention to the backup file for online feedback and member center template. How to modify: /member/templets/ How to modify the information prompt box of dedecms itself:

include/common.func.php Where does the showmsg function dede modify the payment method in the mall?

Go to phpmyadmin to manage the database and modify this table de_shops_paytype. Modify the delivery method: Backstage>Member>Distribution method settings. Payment interface settings: Backstage>Member>Payment interface configuration parameters

Dreamweaver dede How to adjust software whose interface language is Simplified Chinese?

I haven’t looked at the dede program for a long time. The operation method is as follows: you go to the database management program to find the library where the software is stored, find the "Language Interface" field, and then analyze it to see "Simplified Chinese" "Chinese" mark can be filtered out when you write sql.

Founder of dedecms?

Meng Defei

Shanghai Qijin Enterprise Management Co., Ltd. was established on April 23, 2019. Its registered address is Room 192-56, Building 3, No. 2111 Beiyan Highway, Chongming District, Shanghai ( Shanghai Chongming Forest Tourism Park), the legal representative is Meng Defei. The business scope includes enterprise management, consulting, business information consulting, marketing planning, cultural and artistic exchange and planning, corporate image planning, conference services, exhibition display services, technology development, technology transfer, technology consulting and technical services in the field of information technology.

How to make the URL paths of the mobile version and PC version of the Dreamweaver website consistent?

You can make adaptive templates and synchronize them on PC and mobile.

For details, please view the bootstrap help documentation