9-2·100 css下拉菜单

 

   

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>下拉菜单</title>
    <style>
        .hover {
            position: relative;
            display: inline-block;
        }

        .hover2 {
            display: none;
            position: absolute;
            background-color: #f9f9f9;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
            padding: 12px 16px;
        }

        .hover:hover .hover2 {
            display: block;
        }

        /* 加入边框即可。不需要再弄表格  */
        .bor {
            border: 1px solid red;
        }
    </style>
</head>

<body>

    <h2>鼠标移动后出现下拉菜单</h2>
    <p>将鼠标移动到指定元素上就能看到下拉菜单</p>
    <p>Move the mouse over the specified element to see the drop-down menu</p>

    <div class="hover">
        <span class="bor">鼠标移动到这里</span>
        <div class="hover2">
            <p>自强不息</p>
            <P>无敌天下</P>
            <p>替天行道</p>
        </div>

    </div>


    <!-- 无序列表 
        <ul>
        <li>
            <span>鼠标移动这里2</span>
        </li>
    </ul> -->
    <table>

    </table>

</body>

</html>

效果

   

 

推荐这些文章:

5-2·100 css 水平和垂直对齐

 
     NOW一看就会的技术知识点,看了就会能写出来,而且能明白,this is best 关键的! 过去别说写出来,就是看都看不懂,看不明白,又如何写出来呢? 一颗星的技术水平,向3颗星的快速进步中。快速过一遍1颗星的技术知识点。 

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"&...

15-2·100 css 什么是浮动

 
   

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo 模板</title>
...

2-2·100 css定位之静态定位

 
  

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Position(定位)</tit...

8-2·100 css导航栏 垂直导航栏

 
   比较low的导航栏,也是最基础的导航栏样式。一切千变万化的导航栏,都是从这个基础出发写出来的。从面粉到馒头, 半成型的馒头吧? 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-wi...

6-2·100 css伪类 链接鼠标滑过变颜色

 
   

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>伪类 链接鼠标滑过效果</title&g...

10-2·100 css提示工具,鼠标滑过提示文字

 
    

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>提示工具 鼠标滑过提示文字<...

96-100 css盒模型

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>盒模型</title>
<style>

...

11-2·100 单行文字垂直居中

 
  

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>垂直居中</title>
&...

1-2·100 css 尺寸图像的宽高设置

   
  

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>尺寸 图像设置</title...

24-2·100 HTML相对路径

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo模板</title>
</head>
<...

文章标题:9-2·100 css下拉菜单
文章链接:https://www.dianjilingqu.com/51346.html
本文章来源于网络,版权归原作者所有,如果本站文章侵犯了您的权益,请联系我们删除,联系邮箱:saisai#email.cn,感谢支持理解。
THE END
< <上一篇
下一篇>>