Ghost写就像tumblr注册页面 [英] Ghost writing like on tumblr signup page

查看:142
本文介绍了Ghost写就像tumblr注册页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何创建一个tumblr像字段,因为他们有

Does anyone know how to create a tumblr like field as they have on

http://www.tumblr.com/

这是一个URL字段,其中有一些褪色的文字,当你点击它,和类型,它附加一些文本... .tumblr.com,你不能删除或突出显示或任何。 javascript是混淆的,所以我真的没有线索如何完成
我喜欢jquery,但只要它工作真正... ...

It's the URL field where some faded text is there then when you click on it, and type, it appends some text ... .tumblr.com that you cannot erase or highlight or whatever. The javascript is obfuscated so I really have no clues on how it was accomplished I'd prefer jquery but really as long as it works...

推荐答案

编辑:我只是看了一遍。它在输入时接受输入,并将其添加到位于输入字段上方的ghostwriter span中。很简单,真的。 .tumblr.com文本只在span本身。以下内容的效果:< span id =ghostwriter>< span id =ghostwriter-copy>您的输入< / span> .tumblr.com< / span> code>

I just looked at it again. It takes the input as you type it and adds it into the ghostwriter span that lays above the input field. Pretty simple, really. The ".tumblr.com" text is just in the span itself. Something to the effect of: <span id="ghostwriter"><span id="ghostwriter-copy">Your Input</span>.tumblr.com</span>

这篇关于Ghost写就像tumblr注册页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆