Error: ambiguous mapping found. Cannot map ' Controller ' Bean method
Workaround: Bean Repeat initialization, duplicate mapping name, check the mapping name in @requestmapping () to change
Error: Expected one result (or null) to is returned by SelectOne (), but Found:4
WORKAROUND: The query returns multiple values, either the return value is changed to the collection, or the query returns a single value
Simple Media query:
The meaning is not more than 320px is set before the style, 320-900px this large background is red in this range when the 600-720px background color into blue, 900px later became a set before style
That is to say 320-600px: red; 600-720px: blue; 720-900px: red; 900px after: set front style
@media screen and (min-width:320px) and (max-width:900px) {
body{
background-color:red;
}
}
@media screen and (min-width:600px) and (max-width:720px) {
body{
background-color:blue;
}
}
Horizontal screen/vertical screen judgment and action
@media all and (orientation:landscape) {
* * Horizontal screen time code/
} @media All and
(orientation:portrait) {
body{
width:700px;
height:800px;
Transform:rotate (90deg);
-ms-transform:rotate (90deg);
-moz-transform:rotate (90deg);
-webkit-transform:rotate (90deg);
}
}
var mql = Window.matchmedia (' (orientation:portrait) ');
Console.log (MQL);
function Handleorientationchange (MQL) {
if (mql.matches) {
console.log (' portrait '); Vertical screen
alert ("number");
} else {
console.log (' landscape ');//Horizontal Screen
alert ("horizontal");
}//
output current screen mode
Handleorientationchange (MQL);
Monitor screen mode change
mql.addlistener (Handleorientationchange);
HTML static layout browser compatibility meta settings
Dynamically loading CSS and JS to judge the mobile side and dynamically load CSS
Dynamically loading CSS function Includelinkstyle (URL) { var link = document.createelement ("link");
link.rel = "stylesheet";
link.type = "Text/css";
link.href = URL;
document.getelementsbytagname ("Head") [0].appendchild (link);
} includelinkstyle ("http://css.jb51.net/home/css/reset.css?v=20101227");
function ispc (URL) {var useragentinfo = navigator.useragent;
var Agents = ["Android", "IPhone", "SymbianOS", "Windows Phone", "IPad", "IPod"];
var flag = true; for (var v = 0; v < agents.length; v++) {if (Useragentinfo.indexof (agents[v)) > 0) {FL
AG = false;//Mobile phone-side var link=document.createelement ("link");
Link.rel= "stylesheet";
Link.type= "Text/css";
Link.href=url;
document.getElementsByTagName ("Head") [0].appendchild (link);
Break }else{//PC End}
return flag; } ISPC ("..
/css/phonelogin.css "); var flag = ISPC ();
True is PC-side, false for mobile
Knowledge points are relatively fragmented, used to solve some common problems, follow-up will be in-depth study to solve and add, who let us be the best.