jsp中 input placeholder_前端工作中的方法总结
生活随笔
收集整理的這篇文章主要介紹了
jsp中 input placeholder_前端工作中的方法总结
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
/*移動適配*/
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="format-detection" content="telephone=no,email=no,adress=no">/*對Vue的data原始數據初始化*/
Object.assign(this.$data, this.$options.data()) // 對data進行初始化/*垂直居中*/
.center {position: absolute;top: 50%;-webkit-transform: translateY(-50%);transform: translateY(-50%);overflow: hidden;
}/* 漸變色 */
background-image: -webkit-linear-gradient(top, rgba(231, 66, 72, 0), rgba(231, 66, 72, 0.8));
background-image: linear-gradient( top, rgba(231, 66, 72, 0), rgba(231, 66, 72, 0.8));/*取消手機點擊屏幕時,會出現的灰塊*/
html,body{-webkit-text-size-adjust: 100%;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}/*隱藏文本框陰影*/
input, textarea{-webkit-appearance: @none;}/*div編輯*/
<div class="edit"><span ng-show="" class="placeholder">請描述一下什么故障</span><div ng-bind="" id="" contenteditable="true"></div>
</div>/*清除浮動*/
.clearfix:after {
content: "0020";
display: block;
height: 0;
clear: both;
}
.clearfix {
zoom: 1;
}/*字符串截取*/
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;/*兩行截取*/
.mui-ellipsis-2 {display: -webkit-box;overflow: hidden;white-space: normal!important;text-overflow: ellipsis;word-wrap: break-word;-webkit-line-clamp: 2;-webkit-box-orient: vertical;
}/*placeholder樣式*/
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {color: #CCCCCC;font-size: 1.4rem;
}input:-moz-placeholder,
textarea:-moz-placeholder {color: #CCCCCC;font-size: 1.4rem;
}input::-moz-placeholder,
textarea::-moz-placeholder {color: #CCCCCC;font-size: 1.4rem;
}input:-ms-input-placeholder,
textarea:-ms-input-placeholder {color: #CCCCCC;font-size: 1.4rem;
}/*CSS3彈性盒子*/
display: -ms-flex;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-align: center;
-webkit-align-items: center;
-webkit-box-align: center;
align-items: center;
-webkit-justify-content: space-around;
justify-content: space-around;/*兼容性*/
var ev = ev || window.event;
var target = ev.target || ev.srcElement;/*長的英文單詞換行*/
word-break:break-all; /*支持IE,chrome,FF不支持*/
word-wrap:break-word;/*支持IE,chrome,FF*//*表單長度控制*/
.tabBaojia {table-layout: fixed;word-break: break-all;
}<colgroup><col width="60px"><col width="250px">
</colgroup>/*加橫線*/
.navDiv {width: 100%;position: relative;
}.navDiv:after {content: "";position: absolute;left: 0;right: 0;bottom: 0;height: 1px;background-color: #CCCCCC;
}/*js模糊查詢*/
$("#filterName").keyup(function() {$("table tbody tr").hide();$(".inv_neirong").filter(":contains('" + ($(this).val()) + "')").parent().show();
})/*視頻插件*/
<object width='541' height='450'><param name='allowFullScreen' value='true'><param name='movie' value='http://img1.c0.letv.com/ptv/player/swfPlayer.swf?autoPlay=0&id=31121775'/><embed src='http://img1.c0.letv.com/ptv/player/swfPlayer.swf?autoPlay=0&id=31121775' width='541' height='450' allowFullScreen='true' type='application/x-shockwave-flash'/>
</object>//獲取日期之間的日期數組Date.prototype.format = function() {var s = '';var mouth = (this.getMonth() + 1) >= 10 ? (this.getMonth() + 1) : ('0' + (this.getMonth() + 1));var day = this.getDate() >= 10 ? this.getDate() : ('0' + this.getDate());s += this.getFullYear() + '-'; // 獲取年份。 s += mouth + "-"; // 獲取月份。 s += day; // 獲取日。 return(s); // 返回日期。
};function getAll(begin, end) {var dateArr=[];var ab = begin.split("-");var ae = end.split("-");var db = new Date();db.setUTCFullYear(ab[0], ab[1] - 1, ab[2]);var de = new Date();de.setUTCFullYear(ae[0], ae[1] - 1, ae[2]);var unixDb = db.getTime();var unixDe = de.getTime();for(var k = unixDb; k <= unixDe;) {dateArr.push((new Date(parseInt(k))).format());k = k + 24 * 60 * 60 * 1000;}console.log(dateArr);
}/*想將對象凍結,應該使用Object.freeze方法。
用法:Object.freeze( object )
阻止修改現有屬性的特性和值,并阻止添加新屬性。
參數:要被凍結的對象
返回:被凍結的對象
不創建一個被凍結的副本。*///例如:
const foo =Object.freeze({});
// 常規模式時,下面一行不起作用;
// 嚴格模式時,該行會報錯
foo.prop =123;/*上面代碼中,常量foo指向一個凍結的對象,所以添加新屬性不起作用,嚴格模式時還會報錯。
除了將對象本身凍結,對象的屬性也應該凍結。下面是一個將對象徹底凍結的函數。*/
var constantize = (obj) => {Object.freeze(obj);Object.keys(obj).forEach( (key, value) =>{if(typeofobj[key] ==='object') { constantize( obj[key] ); } });
};//與程序無關,是禁止鼠標選中文字。點選的時候容易選中文字 太討厭 。
document.onselectstart=function(event){event = window.event||event;event.returnValue = false;
}
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀
總結
以上是生活随笔為你收集整理的jsp中 input placeholder_前端工作中的方法总结的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: javascript 权威指南第7版_免
- 下一篇: 生命银行怎么样_银行双职工的家庭现状..