本日编写代码实现网页中间展示食品内容模块制作,通过csdn,b站等多种实例借鉴进行编写。
使用bootstrop属性col-lg-3设置内容为四列展示
对应的HTML内容为
<div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
每一个食品内容按从上向下布局
CSS 中Focus属性文本选中颜色变化
.text-muted {
color: #636c72 !important;
}
a.text-muted:focus, a.text-muted:hover {
color: #4b5257 !important;
}
js实现了可以复制页面内容功能
主要代码部分如下:
function copyIdCode()
{
var idcode = document.getElementById("personIdcodeCopy").innerText;
var oInput = document.createElement('input');
oInput.value = idcode;
document.body.appendChild(oInput);
oInput.select();
document.execCommand("Copy");
oInput.className = 'oInput';
oInput.style.display = 'none';
alert('复制成功');
}
本日学习时间3小时