摘要: 父组件相关代码: import React, { Component } from 'react'; // 引入相关模块 import Child from '@/Child'; export default class extends Component { constructor (props) 阅读全文
posted @ 2019-11-13 22:41 奋斗,少年。 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 父组件给子组件传值 父组件主要代码: import React, {Component} from 'react'; import PropTypes from 'prop-types'; // 主要用来判断父组件传递过来的数据类型 class Com extends Component { ren 阅读全文
posted @ 2019-11-13 22:28 奋斗,少年。 阅读(608) 评论(0) 推荐(0) 编辑
摘要: 第一种 简易型 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> #box { width: 1000px; height: 300px; position: relative; margin: 100px auto; } #banner { width: 100 阅读全文
posted @ 2019-09-04 22:47 奋斗,少年。 阅读(184) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> #box { width: 1200px; height: 700px; background-color: #000000; border: 3px solid purple; margin: 200px aut 阅读全文
posted @ 2019-09-03 23:51 奋斗,少年。 阅读(163) 评论(0) 推荐(0) 编辑
摘要: // 定义: // 声明 // 执行: // 函数名+() // 函数的定义的位置 // 函数的执行的位置 // 位置 // this:执行上下文,this一般存在于函数中,表示当前函数的执行上下文,如果函数没有执行,那么this没有内容,只有函数在执行后this才有绑定 // 执行的位置!!! // 1.默认执行:fn():this指向window,严格模式指向undefined // func 阅读全文
posted @ 2019-09-02 23:46 奋斗,少年。 阅读(248) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{box-sizing: border-box;} #box1{width: 900px;height: 150px;border: 1px solid black;position: relative;} #b 阅读全文
posted @ 2019-09-02 20:16 奋斗,少年。 阅读(153) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> #box{width: 300px;margin: 100px auto;position: relative;} p{width: 300px;line-height: 60px;text-align: cent 阅读全文
posted @ 2019-09-01 22:49 奋斗,少年。 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 10 11 12 13 14 15 16 17 18 19 109 阅读全文
posted @ 2019-09-01 22:46 奋斗,少年。 阅读(247) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html>,<html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .box{ width: 400px;height: 400px;border: 1px solid black; 阅读全文
posted @ 2019-08-29 22:24 奋斗,少年。 阅读(142) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html><head> <meta charset="utf-8"> <title></title></head><body><div class="box"> <p>我是第一个p</p> <h3>我是第一个h</h3> <p>我是第二个p</p> <h3>我是第二个 阅读全文
posted @ 2019-08-29 22:15 奋斗,少年。 阅读(187) 评论(0) 推荐(0) 编辑