我正在使用cropper.js v0.8.0
我使用下面的 jQuery 代码来裁剪图像。
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#img_view').attr('src', e.target.result)
};
reader.readAsDataURL(input.files[0]);
setTimeout(initCropper, 1000);
}
function initCropper(){
// console.log("Came here")
var image = document.getElementById('img_view');
var cropper = new Cropper(image, {
aspectRatio: 1/1,
cropBoxResizable: false,
crop: function(e) {
// console.log(e.detail.x);
// console.log(e.detail.y);
}
});
// On crop button clicked
document.getElementById('crop_button').addEventListener('click', function(){
var imgurl = cropper.getCroppedCanvas().toDataURL();
var img = document.createElement("img");
img.src = imgurl;
document.getElementById("cropped_result").appendChild(img);
/* ---------------- SEND …Run Code Online (Sandbox Code Playgroud) 我想要实现的是在输入末尾添加一个圆形搜索按钮,但不知何故我不知道如何做到这一点的逻辑。我使用 Font Awesome 作为图标的显示字体。
.search-box {
outline: none;
padding: 7px;
padding-left: 10px;
padding-right: 40px;
height: 35px;
width: 100%;
border-radius: 30px;
font-size: 15px;
border-color: transparent;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}Run Code Online (Sandbox Code Playgroud)
<input type="text" class="search-box" placeholder="Search For a Product..">Run Code Online (Sandbox Code Playgroud)
这是我的HTML代码
<div class='form-group col-xs-12 col-sm-5 col-md-5'>
<label for='captcha-code'>Captcha Code: </label>
<span id='captcha-text'></span>
<i class='captcha-refresh icon-spinner9 pointer'></i>
</div>
Run Code Online (Sandbox Code Playgroud)
我正在使用icomoons来显示图标。我要实现的目标是,每当有人单击<i class='captcha-refresh icon-spinner9 pointer'></i>它时,我都希望它像装载机一样旋转,以便我们可以证明某些东西正在处理,而我尝试了许多css3转换。所有这些过渡都仅应用于div标签,而不应用于i标签。
请,有人可以提供解决方案吗?提前致谢。
我正在Windows 10上使用git bash,最近将其更新为创建者更新。
每当我尝试在分支之间切换时,我都会得到以下提示
$ git fetch && git checkout master
warning: unable to rmdir Ionic_Developemnt: Directory not empty
Checking out files: 100% (6312/6312), done.
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
Run Code Online (Sandbox Code Playgroud)
我不知道为什么会这样,在Ionic_Development文件夹中还有一个.git隐藏文件夹
任何人都可以提供帮助,为什么会出现错误_ / _
我最近安装了最新版本的nodejs即v8.1.3,我使用的是Windows 10
之后,我想安装cordova和离子包,所以我运行了命令
npm install -g ionic cordova
Run Code Online (Sandbox Code Playgroud)
运行此命令后,我收到以下错误!我对此感到厌倦,因为Google搜索中还没有此错误.
这是我在cmd控制台上获得的错误日志
npm ERR! Unexpected end of input at 1:379680
npm ERR! .1","osenv":"~0.1.3","path-is inside":"~1.0.1","read":"~1.0.7","read-
npm ERR! ^
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\SYS73M CR4CK3R\AppData\Roaming\npm-cache\_logs\2017-07-10T13_45_29_711Z-debug.log
Run Code Online (Sandbox Code Playgroud)
请帮忙_/_