> 文章列表 > js vue的语法问题若干

js vue的语法问题若干

js vue的语法问题若干

这样写了之后,运行出来了的样式依然不够,认为是因为多写了div,因为里面只有一个div,所以应该这样删掉这两个div就好了,然后是num也要匹配

 Vue学习笔记之splice()方法的使用。
splice(index,len,item)是vue中数组变异的方法之一,可以用来删除,更新,和增加数组内容
参数:
index:数组下标
len:为1或0
item:更新或增加的内容
使用方法:
1,删除,当参数形式为splice(index,1)时表示删除下标为index的内容
————————————————
版权声明:本文为CSDN博主「蓝胖胖。」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_44921114/article/details/108608851

今天出了一个问题,快速定位问题:于

<div id="app">

就是因为这个id= "app"没有写导致按钮出不来

<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><!-- import CSS --><link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
</head>
<body>
<div id="app"><el-button type="primary">查看详情</el-button><el-row><el-button>默认按钮</el-button><el-button type="primary">主要按钮</el-button><el-button type="success">成功按钮</el-button><el-button type="info">信息按钮</el-button><el-button type="warning">警告按钮</el-button><el-button type="danger">危险按钮</el-button></el-row><el-row><el-button plain>朴素按钮</el-button><el-button type="primary" plain>主要按钮</el-button><el-button type="success" plain>成功按钮</el-button><el-button type="info" plain>信息按钮</el-button><el-button type="warning" plain>警告按钮</el-button><el-button type="danger" plain>危险按钮</el-button></el-row><el-row><el-button round>圆角按钮</el-button><el-button type="primary" round>主要按钮</el-button><el-button type="success" round>成功按钮</el-button><el-button type="info" round>信息按钮</el-button><el-button type="warning" round>警告按钮</el-button><el-button type="danger" round>危险按钮</el-button></el-row><el-row><el-button icon="el-icon-search" circle></el-button><el-button type="primary" icon="el-icon-edit" circle></el-button><el-button type="success" icon="el-icon-check" circle></el-button><el-button type="info" icon="el-icon-message" circle></el-button><el-button type="warning" icon="el-icon-star-off" circle></el-button><el-button type="danger" icon="el-icon-delete" circle></el-button></el-row><hr><h3>按钮尺寸</h3><el-button type="danger" round>危险按钮</el-button><el-button type="danger" size="medium" round>危险按钮</el-button><el-button type="danger" size="small" round>危险按钮</el-button><el-button type="danger" size="mini" round>危险按钮</el-button><hr><el-button type="success">成功</el-button><el-button type="danger" plain>危险</el-button><el-button type="warning" round>警告</el-button><el-button type="success" circle icon="el-icon-delete"></el-button><h3>图标(字体图标)</h3><i class="el-icon-edit" style="font-size: 30px;color: red">标签</i><b class="el-icon-share"></b><a class="el-icon-delete"></a><el-button type="primary" icon="el-icon-search">搜索</el-button></div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>let v = new Vue({el: '#app',data: function() {return {info:"HelloEUI!"}},methods:{}})
</script>
</html>

http://localhost:63342/jsd-2302-03/Web/day06/03%E6%8C%89%E9%92%AE01.html?_ijt=b454l0damc2oovj1akscb3cvrg排查发现是因为id没有填写导致.

正常因该是这样

<div style="margin: 0 auto;width: 250px">居中,设置固定宽度,居中中才有意义</div>

这个忽略了,当不设置宽度的时候,居中显示不出来效果,什么意思呢,也就是说当写成这样:

先写div 表示一个容器,在容器里面写上style 代表的是样式 样式里面写的是margin 代表的是页边距,写成0 auto ,代表页边距为0 auto就是自动 ,至于自动如何跟居中建立联系,这就是计算机中的常识性了,记住这种组合常识,最重要的一点就是需要,把它跟width也写上才能出现效果,当他们写的时候,需要用分号隔开,这就是这个意义了,至于为什么把这些说清楚,这就是规则.需要练习这种规则,达到无视这种规则,看不到就代表规则被熟练了.

html中导航栏前面的点怎么去掉

CSS学习

吉茹定2个月前24浏览0评论

html中导航栏前面的点怎么去掉?

list-style-type:none 去掉前面的小黑点

这是利用列表<li>来展示导航栏,用的float:left浮动金星列表的横向排列展示,最终形成导航栏

list-style-type 属性是设置列表项标记的类型这个属性默认值是disc就是标题所说的前面的点,

还可以拥有可多值,大致用到多的是none(去掉)\\ circle(空心圆) \\ square(实心方块) \\decimal(数字) .....还有很多值可以参考其中这个属性的API来进行阅读理解