The IMG tag itself is the display of the picture, but through the CSS can be set for its background picture, let it and its own picture to display, the final effect will make you marvel. Of course, the discovery comes from a foreigner, so the code is shared with you right away. Before this, I have never thought of this idea, I think this idea can be applied to a
Through the browser's developer tools to view the Web page source code found that the path of resources such as css,js,img error, the path to the front of a more than one controller path, similar to:
http://localhost:8080/Project root/Controller name/js/jquery-1.9.1.min.js
Workaround: In the JSP page, set the path of the resource to ... /js/jquery-1.9.1.min.js This will return the controller's previous path
;Change the relative path of the resource file, such as Css,js,img, and the access controller to an absolute path:
The second type (recommended)
JSP sets a variable that records the name of the item: the following ${baseurl} is equivalent to/project name%@ taglibURI= "Http://java.sun.com/jsp/jstl/core"prefix= "C"%>%@ taglibURI= "Http://java.sun.com/jsp/jstl/fmt"prefix= "FMT"
Solution:Magic One: Define the picture img tag vertical-align:bottom,vertical-align:middle,vertical-align:top.Img{vertical-align:bottom;}As for the HTML attribute align= "center" (for the picture browser will be processed into align= "middle") solution, is equivalent to vertical-align:middle; so the truth is the same, As long as the vertical-align does not take baseline, the void disappears. Magic Weapon Tw
PHP collects static pages and saves css, img, and js pages, and static page css. PHP collects static pages and saves css, img, and js pages. css for static pages this article describes how PHP collects static pages and saves
1, Outreach style: External link a CSS file, in the HTML header section marked2. Inline style: Write directly to the head3. Inline style: In HTML, when you add multiple CSS filesIn the CSS file, the external @import url (my.css);4. Inline style: Write directly in HTML tagImgThe tag is an inline element and is an inline
DOMContentLoaded Introduction
The DOMContentLoaded event is triggered:
The"All DOM is loaded and triggered after JS is loaded and executed".
However, if Javascript is dynamically loaded, the trigger time of DOMContentLoaded will not be affected"
As shown in, the blue line indicates that DOMContentLoaded starts to trigger, provided that JS has been loaded and executed.
(Only DOM is not triggered when the whole page of the onload event is fully loaded. If DOMContentLoaded is triggered earlier tha
The trigger condition for the domcontentloaded event is:
Will be triggered after all the DOM is loaded and the JS load executes.
But if "JS is dynamically loaded in, it will not affect the domcontentloaded trigger time"
As shown in the following figure, the Blue line represents domcontentloaded start, but only if JS has been loaded and executed.
(Just Dom is not the OnLoad event the entire page loaded complete trigger, domcontentloaded than the onload before the trigger please separate, on
This article illustrates the method of PHP to collect static page and save the page Css,img,js. Share to everyone for your reference. The specific analysis is as follows:
This is a Web page of HTML code and Css,js,font and IMG Resources of the gadget, mainly used to quickly get the template, if you do not have the tim
1. IMG Insert image, use the most, such as Product display class.section img { width: 200px;/* 插入图片更改大小 width 和 height */ height: 210px; margin-top: 30px; /* 插入图片更改位置 可以用margin 或padding 盒模型 */ margin-left: 50px; /* 插入当图片也是一个盒子 */ }2. Background images are generally used for small background images or large backgrounds.aside { width: 400px; height: 400px;
Article Introduction: CSS Sets the method by which the IMG changes automatically with the div width.
Description: Because the screen resolution is different, to realize that a layer in the browser changes with the height of the browser width, the layer always occupies 90% of the browser width, 75% of the height, and the picture in the layer changes with this layer, I believe many people have e
, allows the browser to cache for 86,400 seconds (1 days), and must also set the varybyparam= "None" attribute, which indicates that multiple versions of the page do not require a separate cache.You can also set it programmatically, either in the post code or in the HttpModule:
void Setcache (){This. Response.Cache.SetExpires (DateTime.Now.AddDays (1));//Can be ignoredTimespane ds = new Timespane (1,0,0,0);This. Response.Cache.SetMaxage (DS);//Key code}
Using Cache ConfigurationCon
Most of the projects I have recently worked on are similar. I want to put some separate modules, such as Module A (which may include img, css, html, and js) and module B (which may contain css, html). to create a backend, click or combine the independent modules to copy the AB... module to a page, can... most of the projects I have recently worked on are similar.
Put the input and img in the same line. The img label is always a header higher than the input, which is ugly. What I found most on the website is to add an align = "absmiddle" attribute to img. This method does seem feasible but does not comply with the HTML standard. Later, we found that we can add vertical-align: middle to both input and img:The meth
1. There is a gap at the bottom of the picture2. Principle
An inline block element, such as a picture or form, whose bottom line is aligned with the baseline of the parent box (that is, the default vertical-align:baseline). This creates the problem that there is a blank gap in the bottom side of the picture.
3. Workaround
3.1 Method One: Vertical-align:top | Bottom | Middle3.2 Method Two: Convert inline elements or inline block elements to block-level elements
4. Ps:v
, This is true if there are multiple apps. It's not possible for files with the same file name to be overwritten.
The Static_url in the settings.pyThis URL would appear in your browser:(BTW, make sure the URL of ends with a slash/, without a slash it might work but very unstable, Django would error out this in The log)# STATIC_URL = ‘/static/‘ # it doesn‘t have to thisSTATIC_URL = ‘/static/monkeyking/‘ # it can be anythingYou shouldn ' t hardcode the img
This article mainly introduces how PHP collects static pages and saves css, img, and js pages. it can implement simple web page capture functions and has some reference value, for more information about how to collect static pages in PHP and save css, img, and js. Share it with you for your reference. The specific anal
This article mainly introduces how PHP collects static pages and saves css, img, and js pages. it can implement simple web page capture functions and has some reference value, for more information about how to collect static pages in PHP and save css, img, and js. Share it with you for your reference. The specific anal
This article mainly introduces how PHP collects static pages and saves css, img, and js pages. it can implement simple web page capture functions and has some reference value, for more information about how to collect static pages in PHP and save css, img, and js. Share it with you for your reference. The specific anal
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.