jQuery实现在线文档,2024年最新前端面试录音

35,745次阅读
没有评论

共计 5011 个字符,预计需要花费 13 分钟才能阅读完成。

先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里 P7

深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024 年最新 Web 前端全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
jQuery 实现在线文档,2024 年最新前端面试录音
jQuery 实现在线文档,2024 年最新前端面试录音
jQuery 实现在线文档,2024 年最新前端面试录音
jQuery 实现在线文档,2024 年最新前端面试录音
jQuery 实现在线文档,2024 年最新前端面试录音
jQuery 实现在线文档,2024 年最新前端面试录音

既有适合小白学习的零基础资料,也有适合 3 年以上经验的小伙伴深入学习提升的进阶课程,涵盖了 95% 以上前端开发知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

如果你需要这些资料,可以添加 V 获取:vip1024c(备注前端)
jQuery 实现在线文档,2024 年最新前端面试录音

正文

nextImgId = parseInt(currentId) + 1,

nextImgSrc = opts.imgDirectory;

if (currentId == opts.lastDocNum) {

// If the last page, then do nothing

return false;

}

nextImgSrc += getFile(nextImgId);

$(this).attr(‘data-page’, nextImgId);

$(this).attr(‘src’, nextImgSrc);

})

// Implements #forwardpage and #backpage control click function.

$(‘#controls> #forwardpage, #controls > #backpage’).on(‘click’, function(e) {

e.preventDefault();

var currentId = $docImage.attr(‘data-page’),

nextImgSrc = opts.imgDirectory;

if ($(this).attr(‘id’) ==‘backpage’) {

var nextImgId = parseInt(currentId) – 1;

} else if ($(this).attr(‘id’) ==‘forwardpage’) {

var nextImgId = parseInt(currentId) + 1;

}

if ((currentId == opts.lastDocNum && $(this).attr(‘id’) ==‘forwardPage’) ||

(currentId == 1 && $(this).attr(‘id’) ==‘backpage’)) {

// If the last page or the first page, then do nothing.

return false;

}

// Loads corresponding image file.

nextImgSrc += getFile(nextImgId);

$docImage.attr(‘data-page’, nextImgId);

$docImage.attr(‘src’, nextImgSrc);

})

// Constructs the image file name.

function getFile(n) {

return n +‘.’+ opts.fileType;

}

};

上面,我们定义了 jQuery 方法 viewer(),我们实现了 #forwardpage、#backpage 和#doccontainer 的点击事件处理方法,当用户点击#forwardpage、#backpage 或#doccontainer 动态地加载相应的文档,我们通过修改 img 元素的 src 属性来动态加载文档,并且通过 data-page 属性保存当前文档的页码。

CSS 样式


最后,我们给 #forwardpage 和#backpage 控件元素添加 CSS 样式,具体化定义如下:

/*Back and Forward button style*/

.ios-arrow-left {

cursor:pointer;

display : block;

position:absolute;

z-index : 0;

left:50px;

top:50px;

height:30px;

width:auto;

padding: 0 10px 0 6px;

background-repeat:repeat-x;

background-size : 100% 30px;

background-position :0;

background-image : -webkit-linear-gradient(

bottom,

rgba(0,0,0,0) 0%,

rgba(0,0,0,0) 50%,

rgba(255,255,255,0.1) 50%,

rgba(255,255,255,0.3) 100%

);

border-radius: 5px;

border-bottom: 1px solid rgba(255,255,255,0.4);

box-shadow :0 -1px 1px rgba(0,0,0,0.2)inset,

0 1px 2px rgba(0,0,0,0.8)inset;

font-family : HelveticaNeue;

font-weight: 400;

font-size : 12px;

line-height : 30px;

text-align:center;

color:#fff;

text-shadow : 0px -1px 0px rgba(0,0,0,0.8);

}

.ios-arrow-left:before{

position:absolute;

content :’‘;

left:-8px;

top:3.5px;

height : 24px;

width: 24px;

z-index : 1;

background-repeat:repeat-x;

background-size : 20px 20px;

background-position :-1px -0.5px;

background-image :

-webkit-gradient(linear, left bottom, right top,

from(rgba(0,0,0,0)),

color-stop(0.5, rgba(0,0,0,0)),

color-stop(0.5, rgba(255,255,255,0.1)),

to(rgba(255,255,255,0.3)));

-webkit-transform : rotate(-45deg) skew(-10deg, -10deg);

border-top-right-radius : 10px;

border-top-left-radius :0px;

border-bottom-right-radius : 0px;

border-bottom-left-radius : 10px;

border-left : 1.5px solid rgba(255,255,255,0.4);

box-shadow : 1px 1px 1px rgba(0,0,0,0.4) inset,

-1px 1px 1px rgba(0,0,0,0.5) inset;

-webkit-mask-image :

-webkit-gradient(linear, left top, right bottom,

from(#000000),

color-stop(0.4,#000000),

color-stop(0.5, transparent),

to(transparent));

}

.ios-arrow-right {

cursor:pointer;

display : block;

position:absolute;

z-index : 0;

right:50px;

top:50px;

height:30px;

width:auto;

padding: 0 6px 0 10px;

background-repeat:repeat-x;

background-size : 100% 30px;

background-position :0;

background-image : -webkit-linear-gradient(

bottom,

rgba(0,0,0,0) 0%,

rgba(0,0,0,0) 50%,

rgba(255,255,255,0.1) 50%,

rgba(255,255,255,0.3) 100%

);

border-radius: 5px;

border-bottom: 1px solid rgba(255,255,255,0.4);

box-shadow :0 -1px 1px rgba(0,0,0,0.2)inset,

0 1px 2px rgba(0,0,0,0.8)inset;

font-family : HelveticaNeue;

font-weight: 400;

font-size : 12px;

line-height : 30px;

text-align:center;

color:#fff;

text-shadow : 0px -1px 0px rgba(0,0,0,0.8);

}

.ios-arrow-right:after{

position:absolute;

content :’‘;

right:-7.5px;

top:3px;

height : 24px;

width: 24px;

z-index : 1;

background-repeat:repeat-x;

background-size : 20px 20px;

background-position :-1px -0.5px;

background-image :

-webkit-gradient(linear, left bottom, right top,

from(rgba(255,255,255,0.3)),

color-stop(0.5, rgba(255,255,255,0.1)),

color-stop(0.5, rgba(0,0,0,0)),

to(rgba(0,0,0,0)));

-webkit-transform : rotate(135deg) skew(-10deg, -10deg);

border-top-right-radius : 10px;

border-top-left-radius :0px;

border-bottom-right-radius : 0px;

border-bottom-left-radius : 10px;

border-top : 1.5px solid rgba(255,255,255,0.4);

box-shadow : 1px 1px 1px rgba(0,0,0,0.5) inset,

-1px 1px 1px rgba(0,0,0,0.4) inset;

总结

三套“算法宝典”

jQuery 实现在线文档,2024 年最新前端面试录音

算法刷题 LeetCode 中文版(为例)

人与人存在很大的不同,我们都拥有各自的目标,在一线城市漂泊的我偶尔也会羡慕在老家踏踏实实开开心心养老的人,但是我深刻知道自己想要的是一年比一年有进步。

最后,我想说的是,无论你现在什么年龄,位于什么城市,拥有什么背景或学历,跟你比较的人永远都是你自己,所以明年的你看看与今年的你是否有差距,不想做咸鱼的人,只能用尽全力去跳跃。祝愿,明年的你会更好!

由于篇幅有限,下篇的面试技术攻克篇只能够展示出部分的面试题,详细完整版以及答案解析,有需要的可以关注

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加 V 获取:vip1024c(备注前端)
jQuery 实现在线文档,2024 年最新前端面试录音

一个人可以走的很快,但一群人才能走的更远!不论你是正从事 IT 行业的老鸟或是对 IT 行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
人,只能用尽全力去跳跃。祝愿,明年的你会更好!

由于篇幅有限,下篇的面试技术攻克篇只能够展示出部分的面试题,详细完整版以及答案解析,有需要的可以关注

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加 V 获取:vip1024c(备注前端)
[外链图片转存中…(img-ska7sNEN-1713316344725)]

一个人可以走的很快,但一群人才能走的更远!不论你是正从事 IT 行业的老鸟或是对 IT 行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

原文地址: jQuery 实现在线文档,2024 年最新前端面试录音

    正文完
     0
    Yojack
    版权声明:本篇文章由 Yojack 于2024-10-02发表,共计5011字。
    转载说明:
    1 本网站名称:优杰开发笔记
    2 本站永久网址:https://yojack.cn
    3 本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
    4 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
    5 本站所有内容均可转载及分享, 但请注明出处
    6 我们始终尊重原创作者的版权,所有文章在发布时,均尽可能注明出处与作者。
    7 站长邮箱:laylwenl@gmail.com
    评论(没有评论)