我在找什么:
为角色的一个HALF设置样式的方法.(在这种情况下,一半字母是透明的)
我目前搜索和尝试的内容(没有运气):
以下是我想要获得的一个例子.
是否存在CSS或JavaScript解决方案,或者我将不得不求助于图像?我宁愿不去图像路线,因为这个文本最终会动态生成.
更新:
因为很多人都问过为什么我想要设计一半的角色,这就是原因.我的城市最近花了25万美元为自己定义一个新的"品牌".这个标志就是他们想出来的.许多人抱怨简单性和缺乏创造力,并继续这样做.我的目标是把这个网站想成一个笑话.输入'哈利法克斯'你会明白我的意思.
所以,我有这个问题,过去几天我一直试图修复它而没有运气.我正在使用Jquery.dotdotdot
有什么问题?
当我点击"Read More"
它会扩展内容,当我点击"Read Less"
它将隐藏扩展的内容.如果我点击"Read More"
了第二时间将无法正常工作.
HTML:
<div class='article'>
<div class='articleheader'>Title</div>
<div id='article_$count' class='articlecontent'>
<p>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because …
Run Code Online (Sandbox Code Playgroud) 所以,我有这个页面,我昨天开始.它移动一个以页面为中心的div远离鼠标.一切都很好,直到我调整页面大小.在我移动鼠标之前,div不会回到中心位置.
我已经尝试使用屏幕调整大小,但似乎无法让它工作,所以我刮了它.我是JS和Jquery的新手,所以我需要一个正确的方向.
这是我正在研究的网站.http://afrohorse.netau.net/我知道这是不好的做法,但为了这个页面,我把CSS和JS全部放在一个页面中,这样人们可以右击 - >查看源代码,因为我不能得到一个JSFiddle工作.
在此先感谢您,如果您需要任何澄清,请告诉我们!:)
编辑添加代码:
<!DOCTYPE html>
<html>
<head>
<title>qwerty</title>
<script src="jQuery.js"></script>
<style type="text/css">
body {
background-image:url('cloud.jpg');
background-repeat:repeat;
}
.box {
background-image:url('trans.png');
background-repeat:repeat;
width: 500px;
height: 200px;
position: absolute;
margin:100px -250px -100px 250px;
bottom:50%;
right:50%;
-webkit-border-radius: 15px 15px 15px 15px;
border-radius: 15px 15px 15px 15px;
-webkit-box-shadow:inset 2px 2px 20px 1px #E0D9D9;
box-shadow:inset 2px 2px 20px 1px #E0D9D9;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$(window).mousemove(function(e){
var x = e.pageX-window.innerWidth/2;
if (x <= 400) {
x2=x*0.01
x3=x2+window.innerWidth/2
$('div.box').css({'right': x3}); …
Run Code Online (Sandbox Code Playgroud)