1. 程式人生 > >2016/12/15學習工作總結

2016/12/15學習工作總結

一、學習總結

1、內容:一天一問之如何居中div與居中一個浮動元素?

(1)在chrome瀏覽器與Firefox瀏覽器中使用

body{

margin:0px;

padding:0px;

}

div{

magin:0  auto;

}

這種方法IE瀏覽器不支援

(2)通用的做法使用!document指定標準,頁面開頭引入<!Doctype html PUBLIC"-//W3C//DTD XHTML 1.0 Trasitional//EN""http://www.w3c.org/TR/HTML/DTD/xhtml.1-transitional.dtd">

body{

margin:0px;

padding:0px;

}

div{

magin:0 auto;

}這樣相容性問題就解決了。

浮動元素居中

(3)html部分

<div class="box">

<p>我是浮動的</p>

<p>我是居中的</p>

</div>

css部分

.box{

folat:left;

position:relative

left:50%;

}p{

folat:left;

position:relative

right:50%;

}

父元素和子元素同時在左浮動,然後父元素相對左移動50%,然後子元素相對右移動50%即可;學習了jquery設定內容與屬性。

二、工作總結

1、內容:今天在同事的指導下對後臺往前臺穿的資料有了更清楚的認識,在model中的外來鍵,也就是物件屬性的應用下面就具體程式碼說明。

        TTerminalRecord record = terminalRecordService.get(TTerminalRecord.class, id);
        model.addAttribute("sid", record.getSid());
        model.addAttribute("record", record);

後臺傳的record是物件model中,而所有tterminalrecord中的屬性外來鍵除外可以直接通過record傳到前臺呼叫其他屬性;

<th rowspan="1" class="font-col-two" >${record.updateTime}</th>  

<th rowspan="1" class="font-col-two" >${record.taskTerminal.scheduleJob.content}</th> 

上面一行updateTime是ttermianlrecord裡的屬性直接呼叫;下面一行是外來鍵屬性中的一種,也可以通過這種方式呼叫。

三、明日計劃

1、完成周報

2、完成一天一問

3、完成訂閱資料的檢視整理

4、學習工作總結