웹 사이트를 만들고 있는데, 버튼 몇 개를 만들고 -webkit-box-flex 속성을 추가했습니다. 괜찮 았어. 그러나 단추 중 하나에 드롭 다운 메뉴를 추가하면 -webkit-box-flex 속성이 더 이상 적용되지 않고 작동하지 않습니다. 아무도 무슨 일이 일어나는지 말해 줄 수 있니?-webkit-box-flex 속성이 왜 작동하지 않습니까?
*{
margin: 0px;
padding: 0px;
}
h1{
font: bold 20px PrimaSans BT;
}
h2{
font: italic 14px PrimaSans BT;
}
header, section, footer, aside, nav, article, hgroup, ul, li{
display: block;
}
#wrapper{
max-width: 1000px;
margin: 20px 0px;
display: -webkit-box;
display: -moz-box;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-webkit-box-flex: 1;
-moz-box-flex: 1;
margin-left: auto ;
margin-right: auto ;
}
#searchbox{
float: right;
margin-bottom: 10px;
}
body{
width: 100%;
margin: 0;
display:-moz-box;
-moz-box-pack: center;
display:-webkit-box;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#ffffff), color-stop(1, #bababa));
background-image: -moz-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#ffffff), color-stop(1, #bababa));
background-repeat: no-repeat;
background-attachment: fixed;
}
#navigation{
display: block;
padding: 10px;
margin: 5px;
margin-bottom: 0px;
-webkit-border-radius: 15px;
width: 800px;
height: 60px;
display: -webkit-box;
-webkit-box-orient: horizontal;
display: -moz-box;
-moz-box-orient: horizontal;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#ffffff), color-stop(1, #bababa));
background-image: -moz-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#ffffff), color-stop(1, #bababa));
}
#navigation li:hover ul{
display: block;
}
#navigation ul{
margin: 0px;
padding: 0px;
}
#navigation li{
position: relative;
float: left;
list-style-type: none;
}
#navigation ul:after{
display: block;
clear: both;
visibility: hidden;
}
#navigation li a{
text-decoration: none;
display: block;
color: black;
border-right: 1px solid grey;
padding: 10px 25px;
}
#navigation ul ul{
position: absolute;
border: 20px;
left: 0px;
width: 125px;
display: none;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#ffffff), color-stop(1, #bababa));
}
#navigation ul ul li{
border: 1px solid grey;
width: 99%;
-webkit-transition: background 2s
}
#navigation ul ul li:hover{
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#fffc01), color-stop(1, #ffde00));
}
#navigation ul ul li a{
border-right: none;
}
.navigation_button{
font: bold 18px PrimaSans BT;
-webkit-box-flex: 1;
width: 100px;
padding: 10px;
margin: 10px;
text-align: center;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#ffffff), color-stop(1, #bababa));
background-image: -moz-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#ffffff), color-stop(1, #bababa));
-webkit-border-radius: 10px;
-webkit-transition: -webkit-transform 2s, opacity 2s, background 2s, scale 2s,
}
.navigation_button:hover{
-webkit-transform: scale(1.05);
opacity: 1;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#fffc01), color-stop(1, #ffde00));
background-image: -moz-gradient(linear, left top, left bottom, color-stop(0, `enter code here`#fffc01), color-stop(1, #ffde00));
}
#main_section{
border: 1px solid grey;
width: 750px;
margin-left: 40px;
margin-right: 30px;
border-top: 0px;
height: 800px;
margin-bottom: 10px;
-webkit-border-bottom-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
background-color: #f1f1f1;
-webkit-box-flex: 1;
}
.article_1{
border: 1px solid gray;
background: white;
-webkit-box-flex: 1;
margin-left: 10px;
margin-right: 10px;
margin-top: 10px;
padding: 10px;
}
.article_1_footer{
text-align: right;
}
#footer{
text-align: center;
font: italic 12px Times New Roman
}
감사 : 여기
는 jsfiddle입니다!
어떤 요소에'box-flex' 속성을 적용하려고합니까? 그것은 바이올린에 없습니다. 이러한 속성은 기존 사양에서 비롯되어 단계적으로 제거된다는 것을 알고 있습니까? https://gist.github.com/cimmanon/727c9d558b374d27c5b6 – cimmanon
.navigation_button에 추가 할 예정입니다. –
플렉스 박스의 사양을 단계적으로 사용하는 것보다 새로운 전략을 찾는 것이 좋습니다. – Michael