In the front-end UI design, the production of Web pages is very troublesome, deep feeling! Encounter too many do not understand, or the first time to see, you need to go online to find information! Horizontal scroll bar is one of the problems I encountered, in fact, it is very simple, but in a few projects have used the horizontal scroll bar so take out to say a bit.Requirements interface---such as: a div i
This article mainly introduces the CSS to achieve a three-dimensional horizontal button menu effect code, can realize the mouse slide over the rendering button pressed effect, with a strong 3D stereoscopic effect, involving CSS based on the hover attributes of the border border setting skills, the need for friends can refer to the next
This article describes the
is 5px on the left and 12px on the top;
When the mouse moves to the chain, the image is marked as arrow.off.gif.
Effect changed:
Homepage
Product Introduction
Service Introduction
Technical Support
Buy now
Contact us
The complete css code is:
. Test ul {list-style: none ;}. Test li {float: left; width: 100px; background: # CCC; margin-left: 3px; line-height: 30px ;}. Test a {display: block; text-align: center; height: 30px ;}. Test a: link {
This article mainly introduces JS and css implementation to detect changes in the direction of mobile devices and determine whether the screen is horizontal or vertical. This article provides implementation code respectively. For more information, see
Method 1: Use the trigger to switch between the portrait and landscape screens of the mobile phone
The Code is as follows:
Window. addEventListener ("orient
JS and css are used to detect changes in the direction of mobile devices and determine whether the screen is horizontal or vertical.
Method 1: Use the trigger to switch between the portrait and landscape screens of the mobile phoneCopy codeThe Code is as follows:Window. addEventListener ("orientationchange", function (){
// Announce the value of the new direction
Alert (window. orientation );
}, False );
Me
Css/css3 implements vertical and horizontal center of unknown width and height elements, csscss3
In fact, in some common la s, it is often necessary to realize vertical and horizontal center of elements, the following describes the horizontal and vertical Centering of unknown wide and high elements implemented by
This article mainly introduces about how CSS to achieve vertical horizontal center, has a certain reference value, now share to everyone, the need for friends can refer to
Objective
Often asked in the interview, how to use CSS to achieve a vertical horizontal orientation of the element, especially when the pen test, th
When it comes to the horizontal center of css, you may think it is very simple. text-align: center is OK.
However, sometimes you will find that this writing is ineffective. Why? Read down.
Horizontal center: divided into block-level element residences and row-level element centered
Line element:
An inline element is an inline element. For example ,,,..
Directl
Topic:. a{width:200px;height:200px;Background-color: #ccc;} class= "B" >11111. The first kind CSS3 's transform . a{position:relative;}. b{Position:absolute;top:50%;left:50%;Transform:translate (-50%,-50%);}2. The second type display of the Table-cell . a{display:table;} . b{Display:table-cell;Text-align:center;Vertical-align:middle;} 3. The third type of Flex box layout. a{ Display:flex;Justify-content:center;Align-items:center;}CSS/CSS3 to
First show you the effect of the picture:
View effect Source Download
HTML code section:
The code is as follows:
The above code is very simple, jquery+css achieve gorgeous horizontal level two drop-down menu-source download is complete, I hope you like.
The example of this article tells the JQUERY+CSS to achieve a very beautiful horizontal navigation menu effect. Share to everyone for your reference, specific as follows:
The screenshot of the running effect is as follows:
The background picture used is tab.gif as follows:
The specific code is as follows:
More interested readers of jquery-related content can view the site: "jquery form Opera
How to achieve the effect of horizontal lines passing through text in an HTML page?
There are three ways to achieve this effect, as follows:
1, is the use of CSS style sheet text-decoration:line-through; Property
2, is the use of
3, is the use of
How to Set horizontal and vertical repetition of the background image in CSS?
How to Set horizontal and vertical repetition of the background image in CSS:
It is very easy to set the horizontal or vertical Tile of the background image. You can use the code at both ends. Th
1, single-line vertical centerText is centered vertically in the Layer Vertical-align property is not available. Here's a neat way to do this: set height to the same height as Line-height!Example Source Code [Www.52css.com]2. Horizontal center of LayerSet the width of the div to be less than the width of the parent div, set margin:0 auto, and let the div center.Example Source Code [www.52css.com] #parentdiv {width: 500px;} {width: 200px; Margin:0 au
Css implements code example for vertical and horizontal center of images in div, cssdiv
Code example for implementing the vertical and horizontal center of an image in a div using css:There are still a lot of requirements for vertical and horizontal center of images in an element in practical application. The followin
Some of its usual layouts also often have the need to achieve vertical centering and horizontal centering of elements, following the writing of the horizontal and vertical centering of unknown wide-height elements implemented by several CSS/CSS3PS: Do not consider compatibility issues (next will write JS implementation elements of the
CSS3 2D Deformation properties, scale: Used to zoom elements (zoom in and Out), translate: Move elements on the screen (up or down), rotate: Rotate elements at a certain angle (in degrees), skew: chamfered elements along the x and y axes, matrix: Allows the distortion effect to be controlled with pixel precision. The deformation occurs outside of the document. A deformed element does not affect the position of the non-deformed element near it.Transform-origin: Note In
: 100px; margin-top: -50px; }5. Do not know the heightTransform:translate (50px,100px);-ms-transform:translatey ( -50%)/* IE 9 */-webkit-transform:translatey ( -50%)/* Safari and Chrome */-o-transform : Translatey ( -50%)/* Opera */-moz-transform:translatey ( -50%);/* Firefox * / Three, horizontal center, vertical Center1. Horizontal Vertical center with fixed width and height (familiar to everyone)Parent
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.