I have been working on a project recently - Budou Collection. In short, it is to collect the pictures you like to the Budou page. Many aspects of iframe are used in this process, which can be summarized as follows: 1. As a pop-up layer to cover the bottom If you have ever made a black mask covering the entire page, and the user happens to be using IE6, and there happens to be a select element on the page, then you will have a headache (I won’t go into the principles here). We will find that the pop-up DIV cannot cover the select, so it is our iframe's turn to appear. The logic is as follows: Put an iframe at the same level as the pop-up div Ensure that the z-index of the iframe is smaller than the z-index of the pop-up div Add window resize and scroll events to ensure that the iframe can cover the entire page Part of the code Copy code The code is as follows:var iframe = U.isie6() ? '<iframe style="position:absolute;left:0;top:0;z-index:2000000;filter:Alpha(opacity=0); width:100%;height:' + ds.height + '" frameborder="0"></iframe>' : ''; $container.append(iframe).appendTo($body); 2. Writing cookies across domains There are two domains, a.com and b.com. Under certain conditions, some of the functions of b will appear on page a. Sometimes when operating page a, you need to do some operations on the cookies of domain b.com to facilitate the user's next visit. We only need to add an iframe (dynamic or fixed) to page a, with the src attribute pointing to a proxy page of b, and perform cookie operations on this page. |
>>: The English reading of various special symbols on the keyboard (knowledge popularization)
Use CSS to prevent Lightbox to realize the displa...
Here I use samba (file sharing service) v4.9.1 + ...
Error description: 1. After installing Nginx (1.1...
Drop-down box, text field, file field The upper p...
1. Docker network management 1. Docker container ...
Back in the Kernel 2.6 era, a new security system...
Table of contents 1. The default focus is on the ...
This article example shares the specific code of ...
The installation of mysql-5.7.17 is introduced be...
Let’s take a look at the renderings first: XML/HT...
grammar background: linear-gradient(direction,col...
As we all know, there are two types of images in c...
1. Clear floating method 1 Set the height of the ...
Programmers must deal with MySQL a lot, and it ca...
This article mainly introduces 6 solutions to the...