pseudo-element

Firefox-CSS: border-radius issue for pseudo-element “before”

家住魔仙堡 提交于 2021-02-17 04:46:16
问题 I have a card-element (bootstrap-4) with a front and back, on hover the back side is shown. In order to create a "folded corner effect" I am using a pseudo-element(:before) on the front card, which works fine for all browsers except of firefox. The bottom-left corner of the pseudo-element should also be rounded, so I set a border-radius. Unfortunately in Firefox the corner is not rounded, instead there is a strange box shown in the pseudo-element. Any ideas what is causing this issue in

Not able to get element by xpath inside div with ::before

假装没事ソ 提交于 2021-02-11 02:11:14
问题 I need to get the list of web elements by using web driver object findElements(By.xpath("")); I get the list by using xpath as //*[@class=\"providers-list clearfix\"] .However, I get an error whenever I try to fetch element inside <div class="providers-list clearfix">::before <div class="data-container">..</div> </div> This xpath gives me error: // [@class=\"data-container\"]" as no such element: Unable to locate element: {"method":"xpath","selector":"// [@class="data-container"]"} 回答1:

Not able to get element by xpath inside div with ::before

南楼画角 提交于 2021-02-11 02:04:34
问题 I need to get the list of web elements by using web driver object findElements(By.xpath("")); I get the list by using xpath as //*[@class=\"providers-list clearfix\"] .However, I get an error whenever I try to fetch element inside <div class="providers-list clearfix">::before <div class="data-container">..</div> </div> This xpath gives me error: // [@class=\"data-container\"]" as no such element: Unable to locate element: {"method":"xpath","selector":"// [@class="data-container"]"} 回答1:

Not able to get element by xpath inside div with ::before

这一生的挚爱 提交于 2021-02-11 02:01:21
问题 I need to get the list of web elements by using web driver object findElements(By.xpath("")); I get the list by using xpath as //*[@class=\"providers-list clearfix\"] .However, I get an error whenever I try to fetch element inside <div class="providers-list clearfix">::before <div class="data-container">..</div> </div> This xpath gives me error: // [@class=\"data-container\"]" as no such element: Unable to locate element: {"method":"xpath","selector":"// [@class="data-container"]"} 回答1:

Not able to get element by xpath inside div with ::before

微笑、不失礼 提交于 2021-02-11 01:59:03
问题 I need to get the list of web elements by using web driver object findElements(By.xpath("")); I get the list by using xpath as //*[@class=\"providers-list clearfix\"] .However, I get an error whenever I try to fetch element inside <div class="providers-list clearfix">::before <div class="data-container">..</div> </div> This xpath gives me error: // [@class=\"data-container\"]" as no such element: Unable to locate element: {"method":"xpath","selector":"// [@class="data-container"]"} 回答1:

How would I select the first image in this div with jquery?

拟墨画扇 提交于 2021-02-08 12:55:27
问题 I have this div with a bunch of other divs and images. The main div is m-carousel-inner. What I want to do is select the first img element within this div. How would I go about doing this in javascript or jquery? <div class="m-carousel-inner"> <div class="m-item"> <div class="m-card-light"> <div class="mqc_img"> <img src="http://placehold.it/280x210"> </div><!-- end .mqc_img --> <div class="mqc_info"> <h5>Title</h5> Lorem ipsum dolor sit amet </div><!-- end .mqc_info --> </div> </div> <div

How to center text inside :before pseudo element?

十年热恋 提交于 2021-02-06 11:01:19
问题 I have code like this: span { border-radius: 50%; background-color: #d8d9dd; border: 6px solid #262c40; width: 25px; height: 25px; margin: 30px 0 0 40px; display: block; } span:before { content: attr(data-value); position: relative; white-space: pre; display: inline; top: -27px; left: -29px; width: 200px; text-align: center; } <span data-value="November 2016"></span> <span data-value="May 2016"></span> How can I center the text inside :before pseudo element to be in the middle of the span? Is

Using :first-letter pseudo-element on input button

一曲冷凌霜 提交于 2021-02-05 09:10:48
问题 I'm trying to create a button with only the first letter underlined. Obviously I can not use tags , then I would realize it with css, by using the pseudo element :first-letter. It works very well in other contexts, but in button doesn't work. There are other solutions? 回答1: Since you haven't shared your code, I'll take a bold guess here. You're using <input type="button" value="Some Value"> , because there's no actual text inside (The displayed text comes from the value= attribue), :first

Custom ul bullet with pseudo-selector and alignment

ⅰ亾dé卋堺 提交于 2021-01-28 14:48:46
问题 I made a custom bullet for ul with pseudo-selector. But I want the link text position to be align inside. How do I do that? Here's the link to the Fiddle http://jsfiddle.net/bodyfarmer/13q91433/1/ Css: ul { /* list-style-position: outside; */ margin-bottom: 0; padding-left: 20px; padding-right: 30px; list-style: none; } li:before { content: "\00BB"; padding-right: 0.5em; } HTML: <ul> <li>Link text here Link text here Link text here Link text here Link text here Link text here Link text here

Custom ul bullet with pseudo-selector and alignment

浪子不回头ぞ 提交于 2021-01-28 14:39:20
问题 I made a custom bullet for ul with pseudo-selector. But I want the link text position to be align inside. How do I do that? Here's the link to the Fiddle http://jsfiddle.net/bodyfarmer/13q91433/1/ Css: ul { /* list-style-position: outside; */ margin-bottom: 0; padding-left: 20px; padding-right: 30px; list-style: none; } li:before { content: "\00BB"; padding-right: 0.5em; } HTML: <ul> <li>Link text here Link text here Link text here Link text here Link text here Link text here Link text here