css3

How to make bootstrap 3 dropdown menu working for no JS user

六月ゝ 毕业季﹏ 提交于 2020-01-02 07:51:10
问题 I'm looking how to convert dropdown menu on bootstrap for no JS user. I already see its possible in full CSS but I'm not very friendly with CSS ... Any one can help me ? 回答1: There is a possibility. Download this Bootstrap Implement this code jsFiddle here HTML <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container-fluid"> <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar"> <span class="icon-bar"></span> <span class="icon-bar"></span>

Selector for an element alone in a row? [duplicate]

一世执手 提交于 2020-01-02 07:41:10
问题 This question already has answers here : Targeting flex items on the last or specific row (3 answers) Closed 2 years ago . We have flex container with 2 child elements. When we resize window, and one of flex item wraps, we have each element on its own row. Is it any selector like :when-alone-in-row ? .flex-parent {flex-flow: row wrap} .flex-child .flex-child 回答1: No, there is no selector similar to :when-alone-in-row . However, when you want to select the first and last elements from a group

Make flex children inline-block [duplicate]

*爱你&永不变心* 提交于 2020-01-02 07:32:48
问题 This question already has an answer here : Make flex items take content width, not width of parent container (1 answer) Closed 2 years ago . I would like to have the flex children rendered inline-block so that border-bottom is under the li 's width instead of the container's width. Apparently flex children can't be set as inline-block? Is there a workaround to this problem? .menu { display: flex; flex-flow: column; list-style: none; padding: 0; } .menu > li { display: inline-block; margin

Divide list into two columns

吃可爱长大的小学妹 提交于 2020-01-02 07:01:10
问题 I'm trying to build an unordered list something like this: - Item 1 | - Item 4 - Item 2 | - Item 5 - Item 3 | - Item 6 I have this HTML: <div class="multi-column"> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> <li>Item 6</li> </ul> </div> and this CSS: .multi-column { -moz-column-count: 2; -moz-column-gap: 20px; -moz-column-fill: auto; -webkit-column-count: 2; -webkit-column-gap: 20px; -webkit-column-fill: auto; column-count: 2; column-gap: 20px; column

CSS3 FlexBox transitions

无人久伴 提交于 2020-01-02 05:56:32
问题 In this codepen example: http://codepen.io/DrYSG/pen/ovctn I created three flexboxes. The effect I want is that when one hovers over the middle box, it grows in size (color change in the demo is just to help me know about the hover). In FireFox v19 this almost works correctly. But it is strange what it picks of the start and end widths of the animation. In Chrome v25, I am getting rapid unstable oscillation of states (flashing). Really not correct. In IE10 I get the same transition as FireFox

Overlapping grid items using grid-template-areas / named areas

隐身守侯 提交于 2020-01-02 05:45:08
问题 I'm experimenting with CSS Grids, and this is the layout I'm building: .grid { display: grid; align-items: center; grid-template-columns: 1fr 4rem 1fr; grid-template-rows: 1rem 1fr 1rem; max-width: 900px; margin: 0 auto; } .text { /* // Ideally, this should be grid-area: text */ grid-column: 1 / 3; grid-row: 2 / 3; /* Fix z-index */ position: relative; padding: 4rem; background-color: #fff; } .image { /* // Ideally, this should be grid-area: image; */ grid-column: 2 / 4; grid-row: 1 / -1;

Add an arrow under the active menu item in HTML+CSS

懵懂的女人 提交于 2020-01-02 05:43:31
问题 I am trying to generate a menu like the following: There are several items in the menu and the active one has an arrow after it. The menu items are tags like the following code: <div class="menuCenter"> <div class="linksWrapper"> <a href="#">Home</a> <a class="menuCenterLinkLeft" href="#">Plans & Pricing</a> <a class="menuCenterLinkLeft" href="#">Sign In</a> <a class="menuCenterLinkLeft active" href="#">Sign Up</a> <a class="menuCenterLinkLeft" href="#">Contact</a> </div> </div> I tryied two

Setting a div to be the same height as an image

╄→尐↘猪︶ㄣ 提交于 2020-01-02 05:28:11
问题 Essentially this is what I'm getting... While this is what I want. I have the image height and width set up like this... #content img{ padding: 3%; width: 60%; height: 50%; float: left; } With %s as I want it to be responsive and all. So the exact height of the image in px I can't really tell. When I try to set up the same dimensions for the gray box, it only fills up with what is in it as you can see. #text{ padding: 3%; margin-right: 3%; margin-top: 3%; width: 37%; height: 50%; float: left;

Safari box shadow inset support

荒凉一梦 提交于 2020-01-02 05:24:08
问题 I have a box in one of my websites that has a these property: -moz-box-shadow:inset 0 0 50px #ecf4de; -webkit-box-shadow:inset 0 0 50px #ecf4de; box-shadow:inset 0 0 50px #ecf4de; This gives the box a nice gradient towards the center. However, Safari does not support the "inset" property and IE doesn't support box-shadow at all. I can't use an image for this because the height of this box changes for each situation. I don't want to use 3 images, (one for the top, a repeating one for the

Can i use Calc inside Transform:Scale function in CSS?

限于喜欢 提交于 2020-01-02 04:58:07
问题 I'm trying to calculate the right scale to apply to children inside a parent but i can't use calc() inside transform: scale CSS function. I've done this function with javascript but i'm interested in a pure CSS solution to avoid bloating the page with scripts as much as possible. Example: CSS .anyclass{ height:250px; /*this value can change dinamically */ transform:scale(calc(100% / 490 )); /*is using height value*/ } This definition gives back an invalid property value. Other uses like