<html>
<head>
<meta charset=utf-8 />
<title>「:-moz-placeholder」测试 by 一丝</title>
</head>
<body>
<p>从 Firefox 19 开始将不再支持一个冒号的「:-moz-placeholder」伪元素,改成标准的两个冒号的「::-moz-placeholder」。今后若要兼容,开发者需要在CSS中同时书写两个伪元素。</p>
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=737786" target="_blank">Bug</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/::-moz-placeholder" target="_blank">文档</a></p>
<input type="text" placeholder="Firefox 19+ 显示红色,之前版本显示绿色">
<textarea name="" id="" cols="30" rows="5" placeholder="Firefox 19+ 显示红色,之前版本显示绿色"></textarea>
<p>图片对比:</p>
<img src="http://ww1.sinaimg.cn/mw1024/c1608aa0gw1e6r40io8mmj20hr08qwfg.jpg" alt="Firefox 18图片对比">
</body>
</html>
input{
width: 300px;
height: 30px;
line-height: 30px;
font-size: 14px;
margin: 0;
padding: 0 10px;
display: block;
}
/* Firefox 19+ */
input::placeholder,
textarea::placeholder{
color: red;
opacity: 1;
}
input:focus::placeholder,
textarea:focus::placeholder{
color: blue;
}
/* Firefox 19- */
input:placeholder,
textarea:placeholder{
color: green;
}
input:focus:placeholder,
textarea:focus:placeholder{
color: yellow;
}
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |