• JS effect: get the container where the mouse is located, and cover translucent outside the area


    Yesterday, my friend said that we should achieve an effect,Gets the container where the mouse is located, and the translucency is masked outside the region, namedFocus mode。 Let’s do it today. requirement analysis Gets the location of the mouse and the container the mouse belongs to.mouseover,mouseout,mousedown,mouseup,mouseenter,mouseleave,mousemoveSo many events are too easy. However, because there are […]

  • CSS simply realizes the background screen of pop-up box and input box, and imitates the translucent effect of navigation block on Apple official website.


    Requirements summary If we want to write a component with the effect similar to pop-up box, we first briefly analyze several features of pop-up box: The pop-up box must be at the top of the current page, and no other control can click, focus, etc. until the pop-up box is closed. In order to better […]

  • How to solve the problem that cocos2d-x doesn’t work on the layer setting setopacity()


    I wanted to set the whole layer as translucent, but it didn’t work. Later, I found that the solution was very poor layer:setCascadeOpacityEnabled(true) layer:setOpacity(255 * 0.4) I don’t understand. Why doesn’t the official set cascade opacityenabled to true by default? Isn’t it pure cheating? It’s not mentioned in the document that you can’t find it […]

  • HTML + CSS + jQuery to realize left sliding and stretching navigation menu bar


    PC terminal Mobile terminal code <!DOCTYPE html> <html> <head> < title > left navigation <meta charset=”utf-8″> <script></script> <meta name=”viewport” content=”width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover”> <style> *{ margin:0; padding:0; } #header{ width: 100%; height: 60px; background: #fff; position: fixed; top: 0; } #header .dh_btn{ width: 60px; height: 60px; background: #f00; float: left; cursor: pointer; line-height: 60px; text-align: center; } #header […]

  • IOS animation window view (1)


    IOS has a kind of animation, although simple to use, but can achieve many interesting effects, that is mask animation. If you don’t know about mask animation, you can learn it after reading this series of articles. If you have already used it, this article can help you sort it out and make it more […]

  • Fixed top div to set translucency


    Copy code The code is as follows: <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″> < title > Top fixation < / Title ><style type=”text/css”> html,body {overflow:hidden;margin:0px;width:100%;height:100%;} .virtual_body {width:100%;height:100%;overflow-y:scroll;overflow-x:auto;} .fixed_div {position:absolute;z-index:2008;top:0px;left:0px;right:16px;height:40px;background:#CCCCCC;border-bottom:3px inset;border-color:#006699; //bottom:20px; //border:1px solid red; //border-style:inset; //Translucent effect making//filter:alpha(opacity=50); //-moz-opacity:0.5; //opacity:0.5; //background:#666666; } </style> </head> <body> < div […]

  • HTML Implementation of Fixed Suspension Semi-transparent Search Box on Mobile End


    Question. Question In the mobile mall system, we often see a search box at the top of the page, which bloggers prefer is fixed at the top of the page, semi-transparent suspension, can vaguely see the form of part of the rotation map. To make such a search box, the key technology is: Fixed Search […]