css3 气泡对话框实例
代码如下:
<code class="html"> <meta charset="UTF-8"> <title>css3对话框设计</title> <style> .page{ width:500px; } /* demo1 */ .demo1{ border:2px solid #ccc; padding:10px; margin-bottom:20px; position:relative; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } .demo1:before,.demo1:after{ content:''; width:0; height:0; position:absolute; } .demo1:before{ left:10px; bottom:-8px; border-top:8px solid #ccc; border-left:8px solid transparent; border-right:8px solid transparent; } .demo1:after{ left:12px; bottom:-6px; border-top:8px solid #fff; border-left:6px solid transparent; border-right:6px solid transparent; } /* demo2 */ .demo2{ border:2px solid #29B4F0; padding:10px; position:relative; margin-bottom:20px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } .demo2:before{ content:''; width:8px; height:8px; position:absolute; left:20px; bottom:-7px; background-color:#fff; border:2px solid #29B4F0; border-width: 0 2px 2px 0; -webkit-transform:rotate(45deg); -moz-transform:rotate(45deg); -ms-transform:rotate(45deg); -o-transform:rotate(45deg); transform:rotate(45deg); } /* demo3 */ .demo3{ background-color:#B6F5FE; padding:10px; position:relative; margin-bottom:20px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } .demo3:before,.demo3:after{ content:''; width:0; height:0; position:absolute; } .demo3:before{ left:10px; bottom:-18px; border-top:30px solid #B6F5FE; border-left:8px solid transparent; border-right:8px solid transparent; -webkit-transform:rotate(50deg); -moz-transform:rotate(50deg); -ms-transform:rotate(50deg); -o-transform:rotate(50deg); transform:rotate(50deg); } /* demo4 */ .demo4{ background-color:#82AF11; padding:10px; color:#fff; position:relative; text-shadow:0 -1px 1px rgba(0,0,0,.2); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } .demo4:before{ content:''; width:100px; height:20px; background-color:#82AF11; position:absolute; bottom:-20px; left:200px; } .demo4:after{ content:''; width:50px; height:20px; background-color:#fff; position:absolute; bottom:-20px; left:200px; border-radius:0 20px 0 0; } .demo4 > :first-child:before{ content:''; width:50px; height:20px; background-color:#fff; position:absolute; bottom:-20px; left:250px; border-radius:20px 0 0 0; } </style> <div class="page"> <h1 id="css-气泡对话框设计">css3气泡对话框设计</h1> <p class="demo1">ImagePlay 网站是一个快速的原型开发工具,可用于构建和测试图形处理算法,它配备了超过70多个图像处理器,可以组合成各种复杂的流程链接;该工具完全开源,可运行于windows、苹果、linux系统。<br>:before & after</p> <p class="demo2">How Long to Read 网站是由 Alexander Thorburn-Winsor 开发的一个在线测试一本书籍阅读完所需要的时间,帮助读者发现需要多长时间阅读的书籍,并提供读者量身定制的时间数据,方便用户通过阅读时间来查询适合自己阅读的书籍。<br>:before & :after</p> <p class="demo3">How Long to Read 网站的使用方法:读者输入一本书籍的名称,然后同简单的WPM(全称为words per minute,即每分钟多少个字的意思)来预测用户读书的速度,你可以发现阅读任何书籍的时候所需要多长时间完成,除了此功能外还可以使用该工具来搜索想要的书籍。<br>:before & :after</p> <section class="demo4"><p>Scr IM 网站是一个致力于把邮箱地址转换为短链接的在线工具,可以帮助拥有邮箱的用户避免垃圾邮件的骚扰,用户可以把转换为短链接的邮箱地址发布在公开的网络平台上。<br>:before & :after</p></section> </div> </code>
效果:

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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.

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.

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.
