CSS skill sharing: How to use CSS to create a horizontal secondary drop-down menu Tools/Materials
Notepad
Open Notepad in the browser and enter a page frame first. Okay, now it’s time to define the title, keywords, and description of the page.
content=http-equiv=content-type
Padding: 0;
}
. Jiaoulali:circling{
p>
Color: #red;
}
ul, li{
List style: none;
}< /p>
A {
Text-Decoration: None;
}
.Focus
Border: 5px solid color# Pink;
Right border: none;
Overflow: hidden;
Floating: left;
Margin: 200px00600px
}
. Jiao ul Li ul{
Right border: solid;
border-top:2pxdotted#666;
< p>Background: #black;}
.focus}
.focusulali{width: 150px height: 80px text alignment: center; line height :100px display: block; right border: 5px solid color #red; background: #red; color: #red;}
.focusulliul{position:absolute;display:none;}
.Jiao ul Li:hoverul{display:block;}
. Jiao}
Ul only selects the ul element in the next level nav.
nav selects all ul elements contained in nav.
nav adds a DIV tag to separate a block in the page for display.
The style used in the div is described by the box "jiao" we just declared. Then use unordered tags to put all the codes for reference.
//Allows you to identify your markup by URL
Content-type charset=utf-8/
Padding: 0;
}
.Jiaoul Ali:circling{
Color: #red;
}
ul, li{
List style: None;
}
A {
Text-decoration: None;
}
.Focus
Border: 5px solid color #pink;
Right border: none;
Overflow: hidden;
Floating :Left;
Margin: 200px00600px
}
. Jiao ul Li ul{
Right border: solid;
border-top:2pxdotted#666;
Background: #black;
}
.focus}
. Jiaoulali {width: 150px height: 80px text alignment: center; line height: 100px display: block; right border: 5px solid color #red; background: #red; color: #red; }
. Jiao ul Li ul {Position: absolute; Display: None;}
. Jiao ul Li:hoverul{display:block;}
. Jiao}
Ul selects only ul elements in the next level nav.
nav selects all ul elements contained in nav.
nav
If you want to add more menus, you just need to continue adding special tips
In the process of writing code, be sure to remember to wrap the line. Leave the beginning blank, otherwise you won’t even know what you wrote when you look for something in the future.
How to talk about where to start?
How to use the p box to make a pop-up menu in HTML, that is, when the mouse moves to the target hyperlink, a menu will automatically pop up?
It is very simple to implement this function, which is to use hover and display attributes in combination.
There is another principle. It is also possible to use the click event of the body to operate the element. But it’s troublesome to use js. The following demo can be implemented using only css
OnHereHelloWord
What is the HTML code to create a scrolling menu?
For this question, it is to create a drop-down menu==!
A. It is a form
B. It is also select, but it has multiple and size after it, which means it is multi-line, not like D, which can be dropped down. (Scrolling)
C. is an option in select
How to set the horizontal line of the title in web design?
There are the following methods in Dreamweaver:
1. In the design view, click Insert menu-HTML-Horizontal line, or in the code view, directly enter hr>;
2. Insert a table or p with a height of 1px. Be sure to delete the space characters. If p, set it beyond hiding;
3. You can use CSS: border-bottom:1pxsolid#ccc;
4. You can insert a straight line picture
How to create a framed web page with DW software?
1. Open Dreamweaver in the start menu. After opening it, the first page you see should be as shown in the picture below by default. We select html and enter the editing window of the web page.
2. How to enter the editing of the frame? If your workspace is not "classic", then switch to it in the upper right corner. This makes it easy to find the layout, and of course you can also find the frame in the "Modify" option. We will edit in the "Classic" workspace.
3. Click the black triangle in the lower right corner of the frame, and many frame formats will appear. We choose "Top and Nested Left Frame". Of course, you can choose according to actual needs. This kind of framework is also relatively commonly used.
4. After selecting "Top and Nested Left Frame", a dialog box will appear. If there is no need to modify it, just select the default and click "OK" to edit the frame. .
5. If there is no frame window displayed on the right side, you can open the frame window in the "Window" option, which is very beneficial for our subsequent editing. You can also directly press "shift+f2" "Shortcut key opens.
6. We can make various edits to the frame, such as modifying the border color and width. Click the border of the layer that needs to be edited in the frame window that just opened, or directly click the frame border in the editing window, but the former is usually more convenient and intuitive. After doing this, the following properties will appear. We can then make various edits.
7. Because each frame of the frame is an independent web page, special attention should be paid when saving. Not only do you need to save each web page file, but you also need to save the structure of the frame. For example, the framework I just created needs to save four files.
How to create dw menu?
1. Open dreamweaver, create a new html, manage the site in the lower right corner, then create a new site and choose a location where you want to put the website files. Click Finish at the end. Site creation is completed.
2.spry menu bar: Select "Insert" above, find "Layout Object", and select "spry menu bar". The layout can be selected as needed. Here I chose horizontal, and the menu bar is created. Click the blue area above item 1, that is, "Spry menu bar: MenuBar1" to set the properties of the menu bar.
3. Enter text in the attributes, first enter the text of item 1, then enter the text of items 1.1, 1.2, 1.3, etc., and continue to add item 2, item 3, etc. according to your needs