2020-08-19 Source of topic: http://www.h-camel.com/index.html
[html] How to enable WebApp full screen mode under IOS?
When the website is added to the home screen and then clicked to start, the address bar can be hidden (jumping from the browser or entering the link does not have this effect)
<meta name="apple-mobile-web-app-capable" content="yes" /> /* 删除苹果默认的工具栏和菜单栏 */
<meta name="apple-touch-fullscreen" content="yes" />
For other meta uses, please see my other blog post:
HTML5 meta tag usage summary
https://blog.csdn.net/vampire10086/article/details/106686788
[css] Do you often write css code now?
Although there are many ui frameworks, such as element-ui, bootstrap and the like. However, css3 is broad and profound, and in many cases it is necessary to rely on handwriting to modify the style.
[js] Write a method to calculate N numbers (repeatable), put them in M positions, and how many kinds of arrangements are there
var combine = function(arr, k) {
var result = {};
var subresult = [];
var n = arr.length
var count = 0
function combineSub(subresult){
if(subresult.length == k){
var subres = subresult.slice(0)
var sub = []
subres.forEach(item=>sub.push(arr[item]))
var res = sub.join()
if(result[res] == undefined){
result[res] = sub
count++
}
return;
}
for(var i= 0;i<n;i++){
if(subresult.indexOf(i) ===-1){
subresult.push(i);
combineSub(subresult);
subresult.pop();
}
}
}
combineSub(subresult);
return count;
}
combine([1,2,2],1)
[Soft skills] How to bind domain name development without modifying hosts during local development?
When developing web applications, in order to simulate the production environment, the hosts file in the system will be modified, and the domain name will be added to execute 127.0.0.1 binding to the development directory. For example:
127.0.0.1 admin.test.com
127.0.0.1 example.test.com
But when there is a domain name in chrome, you can use *.localhost without modifying the hosts.
Add test.localhost to the server_name of nginx's vhosts.conf, and then restart nginx to open the bound site in Chrome.
Reprinted from https://www.cnblogs.com/F4NNIU/p/7912237.html