- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我用 html 和 css 创建了一个过滤器布局。
我以 bootstrap 为基础,但我对模板进行了大量自定义。
请在下面找到我的示例:
a:hover {
color: #444;
text-decoration: underline;
}
article {
padding-left: 33px;
padding-right: 33px;
}
/* FACETS */
.extra_callout {
font-size: 12px !important;
font-weight: normal;
text-align: center;
display: block;
margin-top: 10px;
}
.facetwp-slider-wrap {
padding-top: 15px;
}
.facetwp-counts {
float: left;
margin-right: 50px;
}
.sort_title,
.facetwp-sort {
float: left;
}
.facetwp-sort {
margin-left: 10px;
}
#facet_selection {
float: left;
width: 216px;
display: block;
padding-right: 25px;
font-size: 12px;
background: #f3f3f4;
padding: 10px;
margin-right: 20px;
border: 1px solid #949599;
}
.facetwp-dropdown {
font-size: 12px !important;
}
.facetwp-template #comparison_chart {
margin-top: 0;
}
.facetwp-template #comparison_chart .tr {
border-bottom: 1px solid darkgray;
}
#facet_selection p {
padding: 0;
margin: 0;
font-weight: bold;
}
.facetwp-facet {
font-size: 14px !important;
margin-bottom: 15px !important;
}
#facet_selection .title {
font-size: 14px !important;
}
.page-template-page-facet article {
padding-top: 0;
box-shadow: none;
}
.page-template-page-facet {
overflow: scroll;
}
.page-template-page-facet .entry-content {
float: left;
width: 960px;
overflow: hidden !important;
}
.facetwp-type-checkboxes,
.facetwp-type-hierarchy {
max-height: 5000px !important;
}
.cross_buttons {
clear: both;
display: block;
position: relative;
}
.page-template-page-facet #sidebar,
.page-template-page-facet .site-content {
width: 1200px;
}
.page-template-page-experts .site-content {
width: 950px;
}
.comments-area {
clear: both;
}
#comparison_chart img {
max-height: 200px;
border: 1px solid #CCC;
display: block;
margin-bottom: 10px;
}
.faceted .model {
padding-top: 10px;
width: 50% !important
}
.faceted .tr {
overflow: auto;
}
.faceted .tr:nth-child(even) {
background: #f3f3f4;
}
.additional_link {
margin: 10px 0;
text-decoration: none;
background-color: #ff7f00;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fa5), to(#ff7f00));
background-image: -webkit-linear-gradient(top, #fa5, #ff7f00);
background-image: -moz-linear-gradient(top, #fa5, #ff7f00);
background-image: -ms-linear-gradient(top, #fa5, #ff7f00);
background-image: -o-linear-gradient(top, #fa5, #ff7f00);
background-image: linear-gradient(top, #fa5, #ff7f00);
border: 1px solid #bb5d00;
color: #fff;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffaa55, endColorstr=#ff7f00);
padding: 8px 0px;
text-transform: uppercase;
width: 100%;
display: block;
text-align: center;
border-radius: 5px;
}
.clearfix:after {
content: " ";
/* Older browser do not support empty content */
visibility: hidden;
display: block;
height: 0;
clear: both;
}
.facetwp-checkbox {
clear: both;
}
.recommended {
font-size: 11px;
float: left;
position: relative;
top: 2px;
left: 10px;
color: green;
}
.facetwp-facet-must_have .recommended {
top: -5px;
left: 20px;
}
.faceted li.con i {
color: red !important;
text-decoration: none !important;
}
.faceted .making li {
list-style-type: none;
}
.faceted .making ul {
margin-left: 0;
padding-left: 0;
text-indent: -6px;
padding-left: 22px;
margin-left: 6px;
}
.faceted .making ul i {
float: left;
position: relative;
top: 4px;
margin-right: 2px;
margin-left: -20px;
margin-right: 20px;
}
.faceted .model .title {
text-align: center;
display: block;
margin-bottom: 10px;
}
.entry-content .model a {
color: #000;
text-decoration: none;
}
.faceted .price {
width: 35% !important;
text-align: center;
font-size: 24px;
position: relative;
}
.faceted .making {
width: 47% !important;
padding-top: 10px;
padding-right: 10px;
font-size: 13.5px;
}
.faceted .pros {
width: 48% !important;
padding-top: 10px;
font-style: normal !important;
font-size: 13.5px;
}
.faceted .pros ul {
padding-left: 0;
}
.faceted .pros ul li {
list-style-type: none;
font-weight: bold;
margin-bottom: 5px;
line-height: 1.4;
}
.faceted .pros ul li span {
font-weight: normal;
}
.faceted .pro_con {
margin-left: 20px;
display: block;
text-indent: -8px;
padding-left: 14px;
}
.faceted .pro_con.pro {
text-indent: -9px;
}
.faceted .container div:last-of-type .comma {
display: none;
}
.faceted .container div {
display: inline;
font-weight: normal;
}
.faceted .fa-check {
color: green;
}
.faceted .fa-times {
color: red;
}
.faceted .tr {
clear: both;
}
.faceted .tr>span {
float: left;
display: block;
}
.faceted .header_chart {
font-weight: bold;
font-size: 14px;
text-transform: uppercase;
color: #ffffff;
}
.facetwp-sort {
margin-bottom: 20px;
}
.faceted .add_tooltip {
top: 145px;
}
.faceted .header_chart .making,
.faceted .header_chart .pros {
text-align: center !important;
}
.faceted .header_chart .tr>span {
background: #949599;
padding: 5px;
margin: 0;
line-height: 26.9471988677979px;
text-align: center;
}
.faceted .header_chart .pros {
font-style: normal;
}
.faceted .header_chart .tr>span:nth-child(even) {
background: #bdbec1;
}
.faceted .tool {
width: 100% !important;
right: 0px;
left: auto;
top: 20px;
display: none;
background: gray;
text-align: left;
text-transform: none;
font-size: 13px;
color: white;
padding: 5px;
line-height: 1.2;
font-family: 'Open Sans', arial, sans-serif;
position: absolute;
z-index: 5000;
display: none;
}
.site {
max-width: none;
}
.page-template-page-facet .site-content {
max-width: 1200px;
}
.facet-container #facet_selection {
width: 20%;
padding: 1%;
margin-right: 2%;
}
.page-template-page-facet .facet-container .entry-content {
float: left;
overflow: hidden !important;
width: 74%;
/*width: 960px;*/
}
.page-template-page-facet .facet-container .entry-content-mobile {
display: none;
}
.facet-container .faceted .tr>span>span:first-child {
display: none;
}
/*! Tablet --------- */
@media screen and (max-width: 1024px) {
/*#top-container{width:100%;margin:0;}
#top-container .container{padding:0 .5%;}*/
.page-template-page-facet .site-content,
.page-template-page-facet .sidebar {
max-width: 100%;
}
.page-template-page-facet .facet-container .entry-content,
.facet-container .entry-content {
width: 74%;
}
.page-template-page-facet .facet-container .entry-content .model .one_half {
width: 100%;
}
}
/*! Tablet Portrait--------- */
@media screen and (max-width: 900px) and (orientation: portrait) {}
/*! Small Tablet --------- */
@media screen and (max-width: 760px) {}
/* 480px iphone landscape */
@media screen and (max-width: 640px) {
.page-template-page-facet .site-content,
.page-template-page-facet .sidebar {
max-width: 100% !important;
}
#masthead {
display: none;
}
.mobile-container {
display: block;
}
.page-template-page-facet .facet-container .entry-content-mobile {
display: block;
}
.page-template-page-facet .facet-container .entry-content-web {
display: none;
}
.facet-container #facet_selection {
width: 100% !important;
padding: 2% 0;
float: none;
margin: 0 auto 15px;
}
.facet-container #facet_selection p,
.facet-container #facet_selection div {
margin-left: 3%;
margin-right: 3%;
}
.page-template-page-facet .facet-container .entry-content,
.facet-container .entry-content {
width: 100%;
float: none;
}
.facet-container .entry-content .header_chart {
display: none;
}
.facet-container .faceted .tr>span {
width: 100% !important;
padding: 0 0 15px;
float: none;
}
.facet-container .faceted .tr>span>span:first-child {
width: 100% !important;
display: inline-block;
background: none repeat scroll 0 0 #949599;
line-height: 26.9472px;
margin: 0 0 15px;
padding: 5px;
text-align: center !important;
color: #fff;
}
.facet-container .faceted .price {
margin-top: 0;
}
.facet-container .faceted .button {
width: 80%;
margin-left: auto;
margin-right: auto;
}
.facet-container .faceted .making ul {
margin-left: 22px;
}
}
/* 320px iphone portrait */
@media screen and (max-width: 459px) {}
.cross_buttons {
clear: both;
display: block;
position: relative;
}
.buy_link,
.additional_link {
position: relative;
}
.buy_link {
margin: 10px 0px 0px;
}
.button {
text-transform: uppercase;
color: #FFF;
text-align: center;
width: 100%;
display: block;
text-decoration: none;
border-radius: 10px;
border-top: medium none;
border-right: medium none;
border-left: medium none;
-moz-border-top-colors: none;
-moz-border-right-colors: none;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
border-image: none;
margin-top: 10px;
border-bottom: medium none !important;
padding: 8px 0px;
}
.button-rezesionen {
background: #222 none repeat scroll 0% 0%;
;
}
.button-buy {
background: #0274BE none repeat scroll 0% 0%;
;
}
.extra_callout {
font-size: 12px !important;
font-weight: normal;
text-align: center;
display: block;
margin-top: 10px;
}
.clearfix::after {
content: " ";
visibility: hidden;
display: block;
height: 0px;
clear: both;
}
.faceted .making ul {
text-indent: -6px;
padding-left: 22px;
margin-left: 6px;
}
.faceted ul {
margin-bottom: 10px;
}
ul {
list-style: outside none disc;
}
ul,
ol {
margin: 0px 0px 1.6em 1.3333em;
}
.faceted .model .title {
text-align: center;
display: block;
margin-bottom: 10px;
}
.model span {
font-size: 15px;
line-height: 120%;
color: #666;
}
.price {
border-bottom: medium none;
padding: 10px 5px;
width: 100% !important;
text-align: center;
display: block;
margin-top: 45px;
}
.faceted .tr:nth-child(2n) {
background: #F3F3F4 none repeat scroll 0% 0%;
}
.faceted .tr {
clear: both;
}
.faceted .tr {
overflow: auto;
}
.facetwp-template #comparison_chart .tr {
border-bottom: 1px solid #A9A9A9;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #A9A9A9;
}
.faceted .tr:nth-child(2n) {
background: #F3F3F4 none repeat scroll 0% 0%;
}
.faceted .tr {
clear: both;
}
.faceted .tr {
overflow: auto;
}
.one_half {
width: 50%;
}
.full_width,
.one_half,
.one_third,
.two_third,
.one_fourth,
.three_fourth,
.one_fifth,
.two_fifth,
.three_fifth,
.four_fifth,
.one_sixth,
.five_sixth {
float: left;
}
.model span {
font-size: 15px;
line-height: 120%;
color: #666;
}
#comparison_chart .row.buy,
.faceted .price {
border-bottom: medium none;
padding: 10px 5px;
width: 100% !important;
text-align: center;
display: block;
margin-top: 15px;
}
#comparison_chart .col .row span {
display: block;
}
.page-template-page-comparison-new .color-block {
clear: both;
float: left;
width: 16px;
height: 16px;
margin-right: 8px;
border: 1px solid #ccc;
margin-top: 2px;
}
.page-template-page-comparison-new .tab_group.one_fourth {
width: 20%;
}
#comparison_chart tbody tr {
display: none;
}
tr.compare_show {
display: table-row !important;
}
#comparison_chart.compared .key.one_fourth {
display: block;
}
.page-template-page-comparison-new .sort {
display: none;
}
.page-template-page-comparison-new .entry-header,
.entry-content {
padding: 0;
}
.page-template-page-comparison-new .hentry,
.page-template-page-comparison-new .page-header,
.page-content {
box-shadow: none;
padding-top: 0;
}
/* style tabs */
#tabs_compare li {
list-style-type: none;
color: #ffffff;
}
#tabs_compare {
font-size: 14px;
font-weight: bold;
clear: both;
}
#tabs_compare input {
margin-right: 5px;
}
#tabs_compare h5 {
font-size: 16px;
text-transform: uppercase;
margin: 0;
}
#tabs_compare a {
text-decoration: none;
border-bottom: none !important;
}
#tabs_compare a:hover {
cursor: pointer;
}
.tab_group {
clear: both;
}
#checkboxes_shown .tab_group {
display: inline-block;
width: 100%;
}
.tab_group.one_fourth {
clear: none;
padding-right: 5px;
}
.tab_group li {
background: #bdbec1;
padding: 5px 10px;
border: 1px solid #666;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom: none;
}
.tab_group.active li {
background: #949599;
}
.checkbox_full {
clear: both;
width: 100%;
}
#checkboxes_shown .tab_group {
display: none;
}
#checkboxes_shown .tab_group.active {
display: inline-block !important;
}
.Vitamix5200 td {
background: #D0E9C6 !important;
}
#checkboxes_shown {
clear: both;
border: 1px solid #666;
padding: 10px;
border-bottom-right-radius: 5px;
}
/* style results table*/
tbody tr:nth-child(odd) td {
background: #f3f3f4;
}
th {
background: #949599;
text-transform: uppercase;
color: white;
vertical-align: top;
}
#comparison_chart {
font-size: 14px;
color: #666;
box-sizing: border-box;
clear: both;
margin-top: 50px;
}
tr th:nth-child(even) {
background: #bdbec1;
}
td,
th,
tbody,
tale,
#comparison_chart {
border: none;
border-width: 0px;
}
th,
td {
padding: 0px;
text-align: center;
}
#comparison_chart tr {
border: 1px solid #ccc;
}
th,
td {
border-bottom: 0px solid #ccc !important;
}
td {
padding: 10px 0;
vertical-align: top;
}
.containers span,
.controls span {
display: block;
}
.faceted ul {
margin-bottom: 10px;
}
#comparison_chart .row.buy a,
.faceted .price a,
.faceted model a {
text-decoration: none;
background-color: #ff7f00;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fa5), to(#ff7f00));
background-image: -webkit-linear-gradient(top, #fa5, #ff7f00);
background-image: -moz-linear-gradient(top, #fa5, #ff7f00);
background-image: -ms-linear-gradient(top, #fa5, #ff7f00);
background-image: -o-linear-gradient(top, #fa5, #ff7f00);
background-image: linear-gradient(top, #fa5, #ff7f00);
border: 1px solid #bb5d00;
color: #fff;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffaa55, endColorstr=#ff7f00);
padding: 3px;
text-transform: uppercase;
width: 100%;
display: block;
}
.color-block {
clear: both;
}
.colors span {
float: left;
}
.row.buy {
text-transform: uppercase;
}
#comparison_chart .labels {
font-weight: bold;
}
#comparison_chart img {
max-height: 200px;
border: 1px solid #ccc;
display: block;
margin-bottom: 10px;
}
#comparison_chart .col .row:nth-child(even) {
background: #fafafa;
}
.model span {
font-size: 15px;
line-height: 120%;
color: #666666;
}
.model {
font-weight: bold;
width: 15%;
padding: 5px;
}
.price {
width: 5%;
font-size: 16px;
margin-bottom: 5px;
}
.price a {
font-size: 14px;
}
.buy {
width: 11% !important;
}
.warranty {
width: 8% !important;
}
.containers {
width: 8% !important;
}
.hp {
width: 5% !important;
}
.making {
width: 28% !important;
}
.watts {
width: 7% !important;
}
.accessories {
width: 12% !important;
text-align: left;
}
.dimensions {
width: 12% !important;
text-align: left;
}
.pros {
width: auto !important;
text-align: left;
font-style: italic;
padding-right: 5px;
}
th {
padding: 5px 4px;
}
th.accessories,
th.dimensions,
th.pros,
th.making {
text-align: center !important;
}
#comparison_chart .col {
margin-bottom: 30px;
clear: both;
}
#comparison_chart #column_labels th {
font-weight: bold;
}
.model {
font-weight: bold;
}
.model img {
max-width: 100%;
margin: 0 auto;
}
#comparison_chart .blender .accessories,
#comparison_chart .blender .dimensions,
#comparison_chart .blender .pros,
#comparison_chart .making {
text-align: left;
}
.col {
border-bottom: 1px solid #ccc;
height: 165px !important;
}
#column_labels .col {
height: auto !important;
}
#Vitamix5200 .col {
background: #fafafa !important;
}
.blender {
padding: 10px 0px;
}
ul {
padding-left: 20px;
}
.button {
text-transform: uppercase;
color: #ffffff;
text-align: center;
width: 100%;
display: block;
text-decoration: none;
border-radius: 10px;
border: none;
margin-top: 10px;
border-bottom: none !important;
padding: 8px 0;
}
.buy {
position: relative;
}
.buy .additional_savings {
clear: both;
display: block;
margin-top: 10px;
}
.buy a {
display: block;
padding: 3px 15px !important;
line-height: 1.4;
}
.buy_link {
margin: 10px 0 0 0;
}
.buy_link,
.additional_link {
position: relative;
}
.tooltip_icon img {
border: none !important;
}
.tooltip_icon {
position: absolute;
top: 3px;
right: 3px;
width: 12px;
}
.buy .tool {
background: gray;
text-align: left;
text-transform: none;
font-size: 13px;
color: white;
padding: 5px;
line-height: 1.2;
font-family: 'Open Sans', arial, sans-serif;
position: absolute;
z-index: 5000;
display: none;
width: 93%;
}
#select_all {
margin-bottom: 20px;
}
.gform_body {
z-index: 5000;
position: relative;
}
.home .gform_footer {
text-align: center;
position: relative;
top: -75px;
margin-bottom: -100px !important;
z-index: 5;
}
.gform_body .one_fourth {
position: relative;
padding-right: 25px;
}
.gform_body .tooltip_icon {
position: absolute;
top: 0;
right: 10px;
width: 15px;
}
.tooltip {
position: absolute;
top: 30px;
right: 0;
width: 100%;
padding: 10px;
margin: 0 auto;
background: lightgray;
z-index: 5000;
display: none;
}
#compare_choice .one_half {
background: lightgray;
padding: 20px;
text-align: center;
margin-bottom: 20px;
width: 49%;
}
#compare_choice .one_half.model {
margin-right: 1% !important;
font-weight: bold;
}
#compare_choice a {
cursor: pointer;
}
/*hide by feature unless someone completed the quiz */
.page-id-22 #gform_wrapper_1 {
display: none;
}
#gform_wrapper_1 {
font-size: 16px;
}
.widget {
margin: 0;
padding: 0;
width: auto;
}
.site-content {
display: block;
float: none;
margin: 0 auto !important;
max-width: 1200px;
width: 100%;
margin-top: 3em !important;
clear: both;
}
.hentry,
.page-header,
.page-content {
margin: 0 auto;
}
.facetwp-template #comparison_chart .tr {
border-bottom: 1px solid #A9A9A9;
}
.faceted .tr:nth-child(2n) {
background: #F3F3F4 none repeat scroll 0% 0%;
}
.faceted .tr {
clear: both;
}
.faceted .tr {
overflow: auto;
}
#comparison_chart {
font-size: 14px;
color: #666;
}
.entry-content,
.entry-summary,
.page-content,
.comment-content {
hyphens: auto;
word-wrap: break-word;
}
.buttonBuy {
text-transform: uppercase;
color: #FFF;
text-align: center;
background: #ffcc00 none repeat scroll 0% 0%;
width: 100%;
display: block;
text-decoration: none;
border-radius: 10px;
border-top: medium none;
border-right: medium none;
border-left: medium none;
-moz-border-top-colors: none;
-moz-border-right-colors: none;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
border-image: none;
margin-top: 10px;
border-bottom: medium none !important;
padding: 8px 0px;
}
#facet_selection {
float: left;
width: 216px;
display: block;
font-size: 12px;
background: #F3F3F4 none repeat scroll 0% 0%;
padding: 10px;
margin-right: 20px;
border: 1px solid #949599;
}
.faceted li.con i {
color: #F00 !important;
text-decoration: none !important;
}
.faceted .fa-times {
color: #F00;
}
.entry-content {
float: left;
width: 100%;
}
#facet_selection {
width: 260px;
padding: 1%;
margin-right: 2%;
}
.entry-content2 {
float: right;
width: 795px;
}
#facet_selection {
width: 260px;
padding: 1%;
margin-right: 2%;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="main-side page clearfix full_width">
<article class="post" id="page-1144">
<div class="facet-container">
<div id="facet_selection">
<p class="title">Filter 1:</p>
<div class="facetwp-facet facetwp-facet-chooser facetwp-type-checkboxes" data-name="chooser" data-type="checkboxes"></div>
<p class="title">Filter 2:</p>
<div class="facetwp-facet facetwp-facet-lieferumfang facetwp-type-checkboxes" data-name="lieferumfang" data-type="checkboxes"></div>
</div>
</div>
<div class="entry-content2">
<div class="facetwp-template" data-name="beistellbetten">
<div id="comparison_chart" class="faceted">
<div class="header_chart">
<div class="tr">
<span class="model">Modell</span>
<!--<span class="price">Preis</span>-->
<span class="making">Recommended</span>
<!--<span class="pros">Pros/Cons</span>-->
</div>
</div>
<div class="tr"><span class="model"><a target="_blank" href=""><span class="title">Product 1</span>
<span class="one_half"><img width="300" height="300" src="" class="attachment-medium size-medium wp-post-image" alt="" srcset=""
sizes="(max-width: 300px) 100vw, 300px"></span><span class="one_half last_column clearfix"><span class="price">179.90 €</span></span>
</a>
<span class="cross_buttons">
<a target="_blank" href="" ><div class="button button-rezesionen buy_link">Link 1</div></a>
<span class="extra_callout"></span>
</span>
</span>
<span class="making">
<ul>
<li class="cleanup"><b>Attribute 1:</b>
<span class="pro_con"><i class="fa fa-times"></i>DLorem ipsum dolor sum</span> </li>
<li class="cleanup"><b>Attribute 2:</b>
<span class="pro_con"><i class="fa fa-times"></i>Lorem ipsum dolor sum</span> </li>
</ul>
</span>
</div>
<div class="tr"><span class="model"><a target="_blank"
href="#"><span class="title">Product 2</span>
<span class="one_half"><img width="300" height="300" src="" class="attachment-medium size-medium wp-post-image" alt="" srcset=""
sizes="(max-width: 300px) 100vw, 300px"></span><span class="one_half last_column clearfix"><span class="price">154.99 €</span></span>
</a>
<span class="cross_buttons">
<a target="_blank" href="#" ><div class="button button-rezesionen buy_link">Link 1</div></a>
<span class="extra_callout"></span>
</span>
</span>
<span class="making">
<ul>
<li class="cleanup"><b>Attribute 1:</b>
<span class="pro_con"><i class="fa fa-times"></i>DLorem ipsum dolor sum</span> </li>
<li class="cleanup"><b>Attribute 2:</b>
<span class="pro_con"><i class="fa fa-times"></i>Lorem ipsum dolor sum</span> </li>
</ul>
</span>
</div>
</div>
<div class="facetwp-pager"></div>
</div>
</div>
</article>
</div>
当您将过滤器全屏显示时,您会看到上面的 div - 推荐文本所在的位置 - 直到过滤器区域才完全显示。
有什么建议我做错了吗?
感谢您的回复!
最佳答案
关于html - 使用 div 创建过滤表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55217408/
我有一个 div(我认为是容器?)我希望它成为中心页面。 Billede 2 我只想让所有上下文都位于页面中心,这怎么可能? 最佳答案 Billede 2 根据您的要求
我只是在研究 jQuery,偶然发现了 Find 函数。 我是这样测试的: $(document).ready(function(){ $('button').click(function()
如何制定一个规则来做这样的事情: .container .unit:first-child(if it has inside div.box1.extra) + .box2 { top: 50px;}
我想了解为什么浏览器显示 和 的方式不同? 这是一个示例:片段 #1 的预期输出是三个并排的框:[黑色]、[蓝色]、[红色]。代码段 #2 仅显示 [black] 和 [red] - 为什么代码段 #
我有一个奇怪的问题,我无法使用正常的嘶嘶声选择器来正确选择 jQuery 中的某些内容: 这两行代码不做同样的事情。 ele.children("div.a > div").addClass("bad
我有一个包含另外两个 div 的 div first div second div 父 div 有最大高度,因此不能增长超过一定数量。但是两个子 div 可以有任何大小(动态
我在两个 div 之间有问题。 div#mainbody 是父 div 有一个背景,div 2 子 div 有自己的背景所以 div 2 浮出父级 div 但我希望它位于父级 div 中。 HTML:
我在另一个具有特定宽度的 div 中有一个 div,但我希望子 div 的宽度与浏览器屏幕大小成百分比而不是与其父 div 的百分比,这意味着当我将子 div 的宽度设置为 50% 时,我希望它的大小
我有以下代码。当单击 div 1 中的按钮时,我需要隐藏 div 1 并显示 div2。 (在 Angular HTML5 中)。我有一个带有 Controller 等的 JS 文件,目前我有两个不同
现在我可以将容器 div 的大小自动调整到内部 div,或者我可以将整个东西居中...但我不知道如何同时进行这两项操作。 下面是我拥有的 CSS/布局。现在 page 和 main 元素都居中,但如果
当一个单元格 div 包含绝对定位的 div 时,如何在表格 div 中顶部对齐两个单元格 div? 在此示例中,不包含绝对定位的 div 的单元格 div 被下推。 HTML: 1
我的程序是一个游戏,从 4 个可玩 Angular 色开始,每个 Angular 色都在自己的类 charContainer 中,这 4 个 div 位于类 character 的容器中。当玩家通过点
我有这样的东西: 现在,#page 中没有任何格式。它适用于一些内容,我的意思是,当内容更大时,#page 也有更高的高度。但是,当今天我在其中应用 #con
我有一个 React 应用程序,并且在一些 CSS 方面遇到了一个稍微大一点的问题。 我有一个 View 分为两部分。但这两个部分位于一个更大的组件中。左侧部分显示一些联系人,右侧我想显示这些联系人的
我想像 facebook 注册页面一样,一个div1(section width:1024px)有四个div,左边div2(width:50%) 有div3(fb slogan),下面div4(con
在我的网页上遇到一个问题,母版页中的页脚对于某个特定页面没有正确显示。在那个页面上,我有一个 在底部。 在我的头上敲了一会儿之后,我发现要让页脚正确显示,我需要做的就是将该行更改为: 我不明白为什么
我正在使用 this plugin用于跨浏览器兼容的灰度图像。基本上,图像最初处于低不透明度的灰度模式。当用户将鼠标悬停在图像上时,灰度逐渐变为彩色,不透明度返回到 1,之前隐藏的 div 从底部向上
这是一个 jsfiddle link of my issue HTML 8.123456 huh-fjiuetie 条件是: h
当前面的 div 中的文本溢出时,如何防止后面的内联 div 换行显示。 如您所见,对于第一个帖子,主要内容换行到第二行,因此它后面的链接显示在新行上(这是不正确的)。 但是对于第 3 篇文章,主标题
我有一个 div,当它悬停在上面时,它会激活另一个 div。当用户将鼠标移动到激活的 div 上时,我希望该 div 保留下来。这是一个片段。 当您将鼠标悬停在金色框上时,紫色框会隐藏并显示灰色框。当
我是一名优秀的程序员,十分优秀!