我正在尝试创建自己的 url 预览。就像脸书节目一样。不想使用现成的脚本。
我去:小提琴:http: //jsfiddle.net/karimkhan/8wLMx/2/
<div id="box" >
<a href="" style="float:left; width: 300px; margin:0; margin-left:5px;" >some kind of title</a> <!--show url and title description-->
<br/>
<span> www.fbpreview.com <span>
<br/>
<br />
<div>
<img src="'.$logo.'" height="84" width="66" style="float:left;"> <!--shows image on the page-->
<p style="float:left; width: 300px; margin:0;">A lot of preview text A lot of preview textA lot of preview textA lot of preview textA lot of preview textA lot of preview textA lot of preview textA lot of preview text</p>
<div style="clear:both"></div>
</div>
<a href="" target="_blank" style="float:left; width: 300px; margin:0; margin-left:5px;" >See More</a> <!--See more link to go on that page-->
</div>
这里的问题是
1. Entire text is not getting floated on right side of image
2. Link should not be blue colored and underline
3. Box should be single clickable
与输入 URL 时 facebook 显示的图像预览完全相同。代替文本区域,我有文本框。
我想在文本框中输入 url 时显示相同的内容。
数据将来自表格。即 url、预览、图片 url、desc 等