css after before制作的边三角提示框
上三角提示框(使用after伪类元素,当然也可以使用before伪类元素):
<code class="html"> <title>css after before制作的边三角提示框</title> <style type="text/css"> .arrow_box { position: relative; background: #88b7d5; border: 1px solid #c2e1f5; padding: 10px; width: 200px; height: 100px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); margin: 30px; float: left; } .arrow_box::after{ position:absolute; content:""; height:0; width: 0; pointer-events: none; border: solid transparent; border-color: rgba(136, 183, 213, 0); border-bottom-color: #88b7d5; border-width: 10px; left: 50%; margin-left: -10px; bottom: 100%; } </style> <div class="arrow_box"></div> </code>
效果图:
左三角提示框:
<code class="html"> <title>css after before制作的边三角提示框</title> <style type="text/css"> .arrow_box { position: relative; background: #88b7d5; border: 1px solid #c2e1f5; padding: 10px; width: 200px; height: 100px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); margin: 30px; float: left; } .arrow_box::before{ position:absolute; content:""; height:0; width: 0; pointer-events: none; border: solid transparent; border-color: rgba(136, 183, 213, 0); border-right-color: #88b7d5; border-width: 10px; top: 50%; right: 100%; margin-top:-10px; } </style> <div class="arrow_box"></div> </code>
效果图:
同样,利用上面的实例也可以制作右三角提示框和下三角提示框。这里不再写实例了,读者可以自己尝试一下。
如果需要更多样式的边三角提示框,可以访问这个网站:http://cssarrowplease.com/

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Use the :nth-child(n+3) pseudo-class selector to select the style of child elements whose position is greater than or equal to 3. The specific code example is as follows: HTML code: <divid="container"><divclass="item"> ;First child element</div><divclass="item"&

In the previous article "Css Pseudo-Selector Learning - Pseudo-Element Selector Analysis", we learned about pseudo-element selectors, and today we take a closer look at pseudo-class selectors. I hope it will be helpful to everyone!

CSS styles using the :active pseudo-class selector to achieve mouse click effects CSS is a cascading style sheet language used to describe the performance and style of web pages. :active is a pseudo-class selector in CSS, used to select the state of an element when the mouse is clicked. By using the :active pseudo-class selector, we can add specific styles to the clicked element to achieve the mouse click effect. The following is a simple sample code that demonstrates how to use the :active pseudo-class selector to achieve a mouse click effect.

The difference between insertbefore and before: 1. Usage; 2. Parameters; 3. Return value; 4. Compatibility; 5. Performance; 6. Selector; 7. Automatic creation of elements; 8. Error handling; 9. Cleaning; 10. Chain call; 11. Other differences. Detailed introduction: 1. Usage, insertBefore is a DOM method that can be called directly on any DOM element, before is a jQuery method that can only be called on jQuery objects; 2. Parameters, etc.

The difference between pseudo classes and pseudo elements is: 1. Pseudo classes are used to add some special effects to certain elements, while pseudo elements are used to add some content or styles before or after certain elements; 2. Pseudo elements Classes are usually represented by a single colon ":", while pseudo-elements are usually represented by a double colon "::".

The difference between pseudo-elements and pseudo-classes is: 1. Pseudo-classes are selectors used to select a specific state or position of an element, while pseudo-elements are selectors used to insert additional content before or after the content of an element; 2. The function of the pseudo-class is to change the style of the element according to its state or position, while the function of the pseudo-element is to insert additional content before or after the content of the element and modify its style.

To implement various application scenarios of the CSS:target pseudo-class selector, specific code examples are required. The CSS:target pseudo-class selector is a commonly used CSS selector that can select specific elements based on the anchor point (#) in the URL. . In this article, we will introduce some practical application scenarios of using this pseudo-class selector and provide corresponding code examples. In-page navigation link style switching: When the user clicks on the navigation link in the page, the :target pseudo-class selector can be used to select the currently clicked link.

Pseudo-classes and pseudo-elements in the web are a special form of CSS selectors used to select and style specific elements. Detailed description: 1. Pseudo-class is a selector used to select a specific state or behavior of an element. It starts with a colon (:) and is used to add additional styles to the element; 2. Pseudo-element is used in front of or in front of the content of the element. Selectors inserted after the generated content, starting with a double colon (::), are used to create some extra content that is not in the HTML structure.
