-
代碼如圖
查看全部 -
代碼如圖
查看全部 -
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Busy - 電商</title>
<style>
/*
任務
? ? 1 如何讓 .select正確顯示 應該加什么定位?
? ? 2 怎么隱藏掉 .select_options 這個元素
?*/
body,ul,h3{margin: 0; padding: 0;}
li{list-style: none;}
.select{
? ? height: 24px;
? ? border:solid 1px #ccc;
? ? float: left;
? ? position: relative;
? ? margin: 30px;
? ??
}
.select_name{
? ? font-size: 12px;
? ? font-weight: normal;
? ? line-height: 24px;
? ? padding: 0 24px 0 7px;
}
.select_triangle{
? ? border-width: 4px;
? ? border-style: solid dashed dashed;
? ? border-color: rgb(80, 174, 248) transparent transparent;
? ? width: 0; height: 0;
? ? overflow: hidden;
? ? position: absolute;
? ? top: 10px;
? ? right: 8px;
}
.select_options{
? ? width: 100%;
? ? border: solid 1px #ccc;
? ? background-color: #fff;
? ? position: absolute;
? ? left: -1px;
? ? top: 23px;
? ? font-size: 12px;
? ? line-height: 24px;
? ? text-indent: 7px;
? ? display: none;
}
.select:hover .select_options{
? ? display:block;
}
.select_options li:hover{
? ? background-color:rgb(80, 174, 248);
}
</style>
</head>
<body>
<div class="select">
? ? <h3 class="select_name">繼續努力哦</h3>
? ? <span class="select_triangle"></span>
? ? <ul class="select_options">
? ? ? ? <li>選項1</li>
? ? ? ? <li>選項1</li>
? ? ? ? <li>選項1</li>
? ? ? ? <li>選項1</li>
? ? </ul>
</div>
</body>
</html>
查看全部 -
input需要清掉哪些默認樣式,和兼容問題如何解決? 如何解決IE8一下的input框文字偏上問題查看全部
-
input ie兼容問題和需要清除的樣式查看全部
-
1 input需要清掉哪些默認樣式,和兼容問題如何解決? 2 如何解決IE8一下的input框文字偏上問題? answer1: input{outline:none;border: none;background: none;} answer2: 設置高度和行高相同查看全部
-
line-height:30px\9; 這個是css hack 寫法, 主要用在瀏覽器之間的兼容, \9:支持IE瀏覽器 \0:支持IE8瀏覽器查看全部
-
如何消除IE瀏覽器的影響,helight:32px;line-height:32px\9 1、對輸入框的文字居中,可用內邊距來設定,也可用行高來確定,如line-height:32px/9;; 2、對單選框和復選框對其問題,可以直接使用margin屬性來暴力定位,或者使用top屬性來定位,但要同時給position:relative;; 3、多個元素居中對其,神操作是同時對這幾個元素設置vertical-align:middle;屬性; 4、表單左側統一對齊,可直接設置同一span標簽,且設固定寬度,并在里面添加內容即可,對于沒有內容的,必須使用 空格轉義字符代替(ie下會需要)。查看全部
舉報