Huma Technology Co., Ltd. has worked for nearly a month of harvest!

I'm a front-end rookie, I hope the big brothers who see it don't spray me. If I have any shortcomings, you can give me some advice. I will be and grateful!

One: The first thing I did after I came here was to bother the backstage brother to install the git version control tool for me . Then start to try to pull and push the project by command. I also summed up all the (basically used) command collections from Du Niang. I will show it below!

<!-------------

1. git init turns the directory folder into a git manageable warehouse
2. git add is to put the specified file in the temporary storage area
git add . is to upload all files in the current file directory to the staging area
3. git commit -m "commented content'" Upload the commented content added to the folder. Submit it to the local warehouse.
git push origin master to commit to the remote repository.
4. git status is used to see if there are still files or modified content that has not been submitted. (Or after modification to view the modified status)
5. The git diff file name is used to see what has been modified.
6. Submitting changes and submitting documents are the same 2 steps. git add filename and git commit -m "comment".
7. git log is to view the history. That is, a record of previous modifications to the file.
8. git clone ssh:......(link) Pull from remote server to local
---------------------->
I also typed for a while, but I didn't use it later. I just used the installed git turtle, right click to pull and push directly. Ha ha! At present, it is easy to use the git tool.
 
Two: It is also the most troublesome problem for us programmers---the problem of compatibility with ie8.
刚开始让我们做官网的页面,我们也是加了一些特效,以及运用了jQuery的ajax进行交互。在谷歌,火狐都很顺利。心里还有点小开心,但是-------放到ie10以下,我们瞬间就炸了。什么都不支持。也包括jQuery。后来换了1.93.1的版本。算是解决ajax的问题了。
以下就是我写的代码
<!-----------------------------
<!--兼容Ie8
 
-->
 
 
<!--[if lte IE 8]>
<script src="../huma/js/html5.js" type="text/javascript"></script>
<![endif]-->
 
<!--*****************************兼容Ie9-->
<!--<script type
 
="text/javascript" src="js/superslide.2.1.js"></script>-->
<!--[if lt IE 9]>
<script src="../huma/js/html5.js"></script>
<![endif]-->
 
<!--[if lt IE9]>
 
 
<script>
 
(function() {
if (!
 
/*@cc_on!@*/
0) return;
var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark,
 
 
 
menu, meter, nav, output, progress, section, time, video".split(', ');
var i= e.length;
while (i--){
document.createElement(e[i])
}
})()
</script>
<![endif]-->
 
<!-- *****************************兼容ie8的jquery插件-->
<!--[if IE 8]>
<script type="text/javascript" src="../huma/js/jquery-1.9.1.min.js"></script>
<![endif]-->
-------------------->
还有一个就是ie不支持class的dom获取。解决的办法是:
//解决IE8之类不支持getElementsByClassName
if (!document.getElementsByClassName) {
document.getElementsByClassName = function (className, element) {
var children = (element || document).getElementsByTagName('*');
var elements = new Array();
for (var i = 0; i < children.length; i++) {
var child = children[i];
var classNames = child.className.split(' ');
for (var j = 0; j < classNames.length; j++) {
if (classNames[j] == className) {
elements.push(child);
break;
}
}
}
return elements;
};
}
 
以及支持媒体查询的兼容问题:
 
respon.min.js 需要借助这个js插件来支持。
 
三:修改弹框样式的问题:
 之前从网上找了一个别人写好的js。然后发现不怎么好用,可以还不好看,最后就找了一个插件。用着还是蛮舒服的。
用法:
引用js、css文件;
zeroModal.css以及zeroModal.js
然后直接调用下面封装好的方法就行!
zeroModal.alert({
content: '操作提示!',
contentDetail: '提交成功',

});
 
 以上就是我这段时间最大的收获了!
自己还会努力加油,争取学到更多的东西不断地去分享我的想法!
 
 
 
 
 
 
 
 
 
 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324802191&siteId=291194637